- refact to use fragments
- use AppCompatActivity so the app bar is more customizable
- switch couple more setting page to use pagedList pattern
Test: manually verified
Change-Id: I936006c07c79e43cc02640916450493a90bcfe3b
diff --git a/res/animator/trans_left_in.xml b/res/animator/trans_left_in.xml
new file mode 100644
index 0000000..2903660
--- /dev/null
+++ b/res/animator/trans_left_in.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2017 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="-100dp"
+ android:valueTo="0dp"
+ android:valueType="floatType"
+ android:propertyName="translationX"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
\ No newline at end of file
diff --git a/res/animator/trans_left_out.xml b/res/animator/trans_left_out.xml
new file mode 100644
index 0000000..eca6489
--- /dev/null
+++ b/res/animator/trans_left_out.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2017 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="0dp"
+ android:valueTo="-100dp"
+ android:valueType="floatType"
+ android:propertyName="translationX"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
\ No newline at end of file
diff --git a/res/animator/trans_right_in.xml b/res/animator/trans_right_in.xml
new file mode 100644
index 0000000..bd4e588
--- /dev/null
+++ b/res/animator/trans_right_in.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="100dp"
+ android:valueTo="0dp"
+ android:valueType="floatType"
+ android:propertyName="translationX"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
\ No newline at end of file
diff --git a/res/animator/trans_right_out.xml b/res/animator/trans_right_out.xml
new file mode 100644
index 0000000..803e1e4
--- /dev/null
+++ b/res/animator/trans_right_out.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="0dp"
+ android:valueTo="100dp"
+ android:valueType="floatType"
+ android:propertyName="translationX"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <objectAnimator
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
\ No newline at end of file
diff --git a/res/drawable/ic_arrow_back.xml b/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..666d256
--- /dev/null
+++ b/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,31 @@
+<!--
+ ~ Copyright (C) 2017 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<!-- This Icon is used in as the back icon on ActionBar. ActionBar hard code the icon layout and
+ ~ does not provide a way to customize it. Here to center the icon in action bar, we make up
+ ~ the margin by add the extra space in the icon itself -->
+<vector
+ android:height="@dimen/icon_size"
+ android:width="@dimen/double_icon_size"
+ android:tint="@color/car_teal_700"
+ android:viewportHeight="24.0"
+ android:viewportWidth="48.0"
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <group
+ android:translateX="12.0" >
+ <path android:fillColor="#FF000000" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
+ </group>
+</vector>
diff --git a/res/layout/volume_list.xml b/res/layout/action_bar.xml
similarity index 60%
copy from res/layout/volume_list.xml
copy to res/layout/action_bar.xml
index 57c6e1d..7646ed3 100644
--- a/res/layout/volume_list.xml
+++ b/res/layout/action_bar.xml
@@ -15,19 +15,20 @@
~ limitations under the License
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <include
- android:id="@+id/media_volume"
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/lens_header_height"
+ android:gravity="end|center_vertical">
+ <TextView
+ android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- layout="@layout/volume_controller_view" />
- <include
- android:id="@+id/ring_volume"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- layout="@layout/volume_controller_view" />
-</LinearLayout>
\ No newline at end of file
+ style="@style/CarTitle"
+ android:textColor="@color/car_teal_700"
+ android:layout_gravity="center_vertical"
+ android:layout_centerVertical="true"
+ android:layout_alignParentStart="true"
+ android:maxLines="1"
+ android:ellipsize="end"/>
+</RelativeLayout>
diff --git a/res/layout/action_bar_with_button.xml b/res/layout/action_bar_with_button.xml
index d716608..e45cff8 100644
--- a/res/layout/action_bar_with_button.xml
+++ b/res/layout/action_bar_with_button.xml
@@ -18,40 +18,45 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="@dimen/action_bar_height"
- android:gravity="end|center_vertical" >
+ android:layout_height="@dimen/lens_header_height"
+ android:gravity="end|center_vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/CarTitle"
+ android:textColor="@color/car_teal_700"
android:gravity="center_vertical"
+ android:layout_centerVertical="true"
android:layout_alignParentStart="true"
- android:maxLines="1"/>
+ android:maxLines="1"
+ android:ellipsize="end"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:orientation="horizontal">
- <Button
+ <TextView
android:id="@+id/action_button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
- android:textSize="@dimen/medium_text_size"
+ style="@style/CarTitle"
+ android:textColor="@color/car_teal_700"
android:visibility="gone"
android:layout_marginEnd="@dimen/button_margin" />
- <Button
+ <TextView
android:id="@+id/action_button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
- android:textSize="@dimen/medium_text_size"
+ style="@style/CarTitle"
+ android:textColor="@color/car_teal_700"
android:layout_marginEnd="@dimen/action_bar_end_widget_margin_end" />
</LinearLayout>
</RelativeLayout>
diff --git a/res/layout/action_bar_with_toggle.xml b/res/layout/action_bar_with_toggle.xml
index d69a49c..bb0af6a 100644
--- a/res/layout/action_bar_with_toggle.xml
+++ b/res/layout/action_bar_with_toggle.xml
@@ -17,7 +17,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="@dimen/action_bar_height"
+ android:layout_height="@dimen/lens_header_height"
android:gravity="center_vertical" >
<TextView
@@ -25,16 +25,18 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/CarTitle"
+ android:textColor="@color/car_teal_700"
android:layout_gravity="center_vertical"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
- android:maxLines="1"/>
+ android:maxLines="1"
+ android:ellipsize="end"/>
<Switch
android:id="@+id/toggle_switch"
android:background="@null"
- android:layout_width="@dimen/icon_size"
- android:layout_height="@dimen/icon_size"
+ android:layout_width="@dimen/stream_button_icon_size"
+ android:layout_height="@dimen/stream_button_icon_size"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/action_bar_end_widget_margin_end" />
diff --git a/res/layout/add_wifi.xml b/res/layout/add_wifi.xml
index 760b0de..a03929c 100644
--- a/res/layout/add_wifi.xml
+++ b/res/layout/add_wifi.xml
@@ -27,7 +27,7 @@
android:id="@+id/wifi_name_display"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size" />
+ style="@style/CarBody1.SingleLine" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -37,7 +37,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
- android:textSize="@dimen/medium_text_size"
+ style="@style/CarBody1"
android:hint="@string/wifi_ssid_hint" />
</android.support.design.widget.TextInputLayout>
</ViewSwitcher>
@@ -51,7 +51,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
- android:textSize="@dimen/medium_text_size"
+ style="@style/CarBody1"
android:inputType="textPassword"
android:hint="@string/wifi_password" />
</android.support.design.widget.TextInputLayout>
diff --git a/res/layout/volume_list.xml b/res/layout/app_compat_activity.xml
similarity index 67%
rename from res/layout/volume_list.xml
rename to res/layout/app_compat_activity.xml
index 57c6e1d..3569ac8 100644
--- a/res/layout/volume_list.xml
+++ b/res/layout/app_compat_activity.xml
@@ -17,17 +17,18 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical" >
- <include
- android:id="@+id/media_volume"
+ android:orientation="vertical">
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/toolbar"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- layout="@layout/volume_controller_view" />
- <include
- android:id="@+id/ring_volume"
+ android:layout_height="@dimen/lens_header_height"
+ app:theme="@style/ActionBarStyle.Car"
+ app:contentInsetStart="@dimen/stream_content_keyline_1" />
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- layout="@layout/volume_controller_view" />
-</LinearLayout>
\ No newline at end of file
+ android:layout_height="match_parent"
+ android:id="@+id/fragment_container"/>
+</LinearLayout>
diff --git a/res/layout/application_details.xml b/res/layout/application_details.xml
deleted file mode 100644
index ec0ee4c..0000000
--- a/res/layout/application_details.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2017 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="@dimen/stream_card_keyline_1"
- android:layout_marginEnd="@dimen/stream_card_keyline_1"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/icon"
- android:layout_width="@dimen/icon_size"
- android:layout_height="@dimen/icon_size"
- android:layout_centerVertical="true"
- android:layout_marginStart="@dimen/stream_card_keyline_1"
- android:layout_alignParentStart="true"
- style="@style/SettingIcon"/>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_toEndOf="@+id/icon"
- android:layout_centerVertical="true"
- android:paddingTop="@dimen/tile_top_bottom_padding"
- android:paddingBottom="@dimen/tile_top_bottom_padding">
- <TextView
- android:id="@+id/title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"/>
- <TextView
- android:id="@+id/desc"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/small_text_size"
- android:visibility="gone"/>
- </LinearLayout>
- </RelativeLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/tile_top_bottom_padding"
- android:orientation="horizontal">
- <Button
- android:id="@+id/disable_toggle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:textSize="@dimen/small_text_size"
- android:layout_weight="1"/>
- <Button
- android:id="@+id/force_stop"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:textSize="@dimen/small_text_size"
- android:layout_weight="1"
- android:text="@string/force_stop"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <LinearLayout
- android:id="@+id/permission_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/tile_top_bottom_padding"
- android:orientation="vertical">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"
- android:text="@string/permissions_label"/>
- <TextView
- android:id="@+id/permission_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/small_text_size"
- android:text="@string/computing_size"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/tile_top_bottom_padding"
- android:orientation="vertical">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"
- android:text="@string/data_usage_summary_title"/>
- <TextView
- android:id="@+id/data_usage_summary"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/small_text_size"
- android:text="@string/computing_size"/>
- </LinearLayout>
- </LinearLayout>
-</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/bluetooth_details.xml b/res/layout/bluetooth_details.xml
index 6945435..75fbffa 100644
--- a/res/layout/bluetooth_details.xml
+++ b/res/layout/bluetooth_details.xml
@@ -28,14 +28,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
- android:textSize="@dimen/medium_text_size"
+ style="@style/CarBody1"
android:hint="@string/bluetooth_preference_paired_dialog_name_label" />
</android.support.design.widget.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bluetooth_device_advanced_profile_header_title"
- android:textSize="@dimen/medium_text_size"/>
+ style="@style/CarBody1"/>
<com.android.car.view.PagedListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list"
diff --git a/res/layout/bluetooth_list.xml b/res/layout/bluetooth_list.xml
index 1f04c86..3c5b89c 100644
--- a/res/layout/bluetooth_list.xml
+++ b/res/layout/bluetooth_list.xml
@@ -41,6 +41,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bluetooth_disabled"
- android:textSize="@dimen/medium_text_size"/>
+ style="@style/CarBody1" />
</ViewSwitcher>
</LinearLayout>
diff --git a/res/layout/date_picker.xml b/res/layout/date_picker.xml
index 09cd956..6e78adc 100644
--- a/res/layout/date_picker.xml
+++ b/res/layout/date_picker.xml
@@ -15,19 +15,12 @@
~ limitations under the License
-->
-<LinearLayout
+<DatePicker
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <DatePicker
- android:id="@+id/date_picker"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <Button
- android:id="@+id/confirm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"
- android:text="@string/okay"/>
-</LinearLayout>
\ No newline at end of file
+ android:id="@+id/date_picker"
+ android:scaleX="1.5"
+ android:scaleY="1.5"
+ android:layout_gravity="center"
+ android:datePickerMode="spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
diff --git a/res/layout/icon_text_line_item.xml b/res/layout/icon_text_line_item.xml
index 1d12fed..0cc5262 100644
--- a/res/layout/icon_text_line_item.xml
+++ b/res/layout/icon_text_line_item.xml
@@ -24,7 +24,7 @@
android:layout_alignParentStart="true"
style="@style/SettingIcon" />
<LinearLayout
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerVertical="true"
@@ -34,12 +34,12 @@
android:layout_marginEnd="@dimen/stream_card_keyline_3" >
<TextView
android:id="@+id/title"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CarBody1.SingleLine" />
<TextView
android:id="@+id/desc"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CarBody2.SingleLine"
android:layout_marginTop="@dimen/double_line_text_margin"
diff --git a/res/layout/icon_toggle_line_item.xml b/res/layout/icon_toggle_line_item.xml
index 9db33a1..113c45d 100644
--- a/res/layout/icon_toggle_line_item.xml
+++ b/res/layout/icon_toggle_line_item.xml
@@ -53,6 +53,6 @@
style="@style/SettingIcon"
android:layout_marginEnd="@dimen/stream_card_keyline_1"
android:layout_alignParentEnd="true"
- android:switchMinWidth="@dimen/icon_size"
+ android:switchMinWidth="@dimen/stream_button_icon_size"
android:visibility="gone"/>
</RelativeLayout>
diff --git a/res/layout/in_list_header.xml b/res/layout/in_list_header.xml
deleted file mode 100644
index 3d70a17..0000000
--- a/res/layout/in_list_header.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size" />
\ No newline at end of file
diff --git a/res/layout/text_line_item.xml b/res/layout/text_line_item.xml
index dd15538..98f1d3b 100644
--- a/res/layout/text_line_item.xml
+++ b/res/layout/text_line_item.xml
@@ -22,12 +22,12 @@
android:orientation="vertical" >
<TextView
android:id="@+id/title"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CarBody1.SingleLine" />
<TextView
android:id="@+id/desc"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/double_line_text_margin"
style="@style/CarBody2.SingleLine" />
diff --git a/res/layout/time_picker.xml b/res/layout/time_picker.xml
index 835e379..4c21fe6 100644
--- a/res/layout/time_picker.xml
+++ b/res/layout/time_picker.xml
@@ -15,19 +15,12 @@
~ limitations under the License
-->
-<LinearLayout
+<TimePicker
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <TimePicker
- android:id="@+id/time_picker"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <Button
- android:id="@+id/confirm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"
- android:text="@string/okay"/>
-</LinearLayout>
\ No newline at end of file
+ android:id="@+id/time_picker"
+ android:scaleX="1.5"
+ android:scaleY="1.5"
+ android:layout_gravity="center"
+ android:timePickerMode="spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
diff --git a/res/layout/toggle_line_item.xml b/res/layout/toggle_line_item.xml
index 8a01185..b103af2 100644
--- a/res/layout/toggle_line_item.xml
+++ b/res/layout/toggle_line_item.xml
@@ -45,5 +45,5 @@
style="@style/SettingIcon"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/stream_card_keyline_1"
- android:switchMinWidth="@dimen/icon_size"/>
+ android:switchMinWidth="@dimen/stream_button_icon_size"/>
</com.android.car.settings.common.InterceptTouchRelativeLayout>
\ No newline at end of file
diff --git a/res/layout/volume_controller_view.xml b/res/layout/volume_controller_view.xml
deleted file mode 100644
index c384f95..0000000
--- a/res/layout/volume_controller_view.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2017 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/icon"
- android:layout_width="@dimen/icon_size"
- android:layout_height="@dimen/icon_size"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_marginStart="@dimen/car_list_item_icon_right_margin"
- android:layout_marginEnd="@dimen/car_list_item_icon_right_margin" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="@dimen/tile_top_bottom_padding"
- android:paddingBottom="@dimen/tile_top_bottom_padding"
- android:layout_toEndOf="@+id/icon" >
- <TextView
- android:id="@+id/stream_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size" />
- <SeekBar
- android:id="@+id/seekbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- </LinearLayout>
-</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/wifi_list.xml b/res/layout/wifi_list.xml
index 21cfc73..ee1cffb 100644
--- a/res/layout/wifi_list.xml
+++ b/res/layout/wifi_list.xml
@@ -40,6 +40,6 @@
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="@dimen/medium_text_size"/>
+ style="@style/CarBody1"/>
</ViewSwitcher>
</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a6fda80..adc0602 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -17,16 +17,12 @@
<resources>
<dimen name="icon_size">56dp</dimen>
- <dimen name="action_bar_height">112dp</dimen>
+ <dimen name="double_icon_size">112dp</dimen>
<dimen name="line_item_height">128dp</dimen>
<dimen name="side_margin">148dp</dimen>
- <dimen name="double_line_text_margin">10dp</dimen>
+ <dimen name="double_line_text_margin">4dp</dimen>
<dimen name="action_bar_end_widget_margin_end">46dp</dimen>
- <dimen name="small_text_size">14sp</dimen>
- <dimen name="medium_text_size">18sp</dimen>
-
-
<dimen name="drawer_1_line_item_height">72dp</dimen>
<dimen name="drawer_2_line_item_height">96dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 907d906..545c90c 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -32,48 +32,29 @@
<item name="android:ellipsize">end</item>
</style>
- <attr name="WifiSignalColor" format="reference" />
- <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Material.Medium" >
- <item name="android:textSize">@dimen/medium_text_size</item>
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- </style>
- <style name="TextAppearance.Small" parent="@android:style/TextAppearance.Material.Small" >
- <item name="android:textSize">@dimen/small_text_size</item>
- <item name="android:textColor">?android:attr/textColorSecondary</item>
- </style>
- <style name="TextAppearance.Switch" parent="@android:style/TextAppearance.Material.Title" />
-
- <style name="TextAppearance.CategoryTitle" parent="@android:style/TextAppearance.Material.Body2">
- <item name="android:textColor">?android:attr/textColorSecondary</item>
- </style>
-
- <style name="TextAppearance.TileTitle" parent="@android:style/TextAppearance.Material.Subhead" >
- <item name="android:textSize">@dimen/medium_text_size</item>
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- </style>
- <style name="TextAppearance.TileSubTitle" parent="@android:style/TextAppearance.Material.Body1" />
- <style name="TextAppearance.RecentsTitle" parent="TextAppearance.CategoryTitle" />
- <style name="TextAppearance.ResultTitle" parent="TextAppearance.CategoryTitle" />
-
<style name="Theme.SettingsBase" parent="@android:style/Theme.Material.Settings" />
- <style name="CarSettingTheme" parent="Theme.SettingsBase">
+ <attr name="WifiSignalColor" format="reference" />
+
+ <style name="CarSettingTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
<item name="wifi_signal">@drawable/wifi_signal</item>
<item name="WifiSignalColor">?android:attr/colorAccent</item>
- <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
- <item name="android:actionBarSize">@dimen/action_bar_height</item>
- <item name="actionBarSize">@dimen/action_bar_height</item>
<item name="android:background">@color/car_card</item>
</style>
+ <style name="ActionBarStyle.Car" parent="@style/Theme.AppCompat">
+ <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
+ <item name="actionBarSize">@dimen/lens_header_height</item>
+ </style>
+
<style name="TrimmedHorizontalProgressBar" parent="android:Widget.Material.ProgressBar.Horizontal">
<item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_material_trimmed</item>
<item name="android:minHeight">3dp</item>
<item name="android:maxHeight">3dp</item>
</style>
<style name="SettingIcon">
- <item name="android:layout_width">@dimen/icon_size</item>
- <item name="android:layout_height">@dimen/icon_size</item>
+ <item name="android:layout_width">@dimen/stream_button_icon_size</item>
+ <item name="android:layout_height">@dimen/stream_button_icon_size</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:gravity">center_vertical</item>
<item name="android:scaleType">fitCenter</item>