- make lineitem aware of its state: clicable, enabled, expandable
- switch TimezonePicker to use paged list pattern
- make action bar span the full width, so the home/back button can be customized
- add checkbox line item type
- customize switch and seekbar
- many other UI tweaks
Test: manually tested
Change-Id: I0a1559630073a53bc798802d680ce28e1b120c3c
diff --git a/res/color/text_body_1.xml b/res/color/text_body_1.xml
new file mode 100644
index 0000000..0293e6f
--- /dev/null
+++ b/res/color/text_body_1.xml
@@ -0,0 +1,23 @@
+<?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
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/car_body1" />
+ <item android:state_enabled="false"
+ android:alpha="0.5"
+ android:color="@color/car_body1" />
+</selector>
\ No newline at end of file
diff --git a/res/color/text_body_2.xml b/res/color/text_body_2.xml
new file mode 100644
index 0000000..de1bc52
--- /dev/null
+++ b/res/color/text_body_2.xml
@@ -0,0 +1,23 @@
+<?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
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/car_body2" />
+ <item android:state_enabled="false"
+ android:alpha="0.5"
+ android:color="@color/car_body2" />
+</selector>
\ No newline at end of file
diff --git a/res/drawable/ic_arrow_back.xml b/res/drawable/ic_arrow_back.xml
index 666d256..da6334f 100644
--- a/res/drawable/ic_arrow_back.xml
+++ b/res/drawable/ic_arrow_back.xml
@@ -18,14 +18,13 @@
~ 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:height="@dimen/stream_button_icon_size"
+ android:width="@dimen/stream_button_icon_size"
android:tint="@color/car_teal_700"
android:viewportHeight="24.0"
- android:viewportWidth="48.0"
+ android:viewportWidth="24.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>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>
diff --git a/res/drawable/ic_check_box.xml b/res/drawable/ic_check_box.xml
new file mode 100644
index 0000000..98b2869
--- /dev/null
+++ b/res/drawable/ic_check_box.xml
@@ -0,0 +1,24 @@
+<?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
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item android:drawable="@drawable/ic_check_box_unchecked"
+ android:state_checked="false"/>
+ <item android:drawable="@drawable/ic_check_box_checked"
+ android:state_checked="true"/>
+ <item android:drawable="@drawable/ic_check_box_unchecked"/>
+</selector>
\ No newline at end of file
diff --git a/res/drawable/ic_check_box_checked.xml b/res/drawable/ic_check_box_checked.xml
new file mode 100644
index 0000000..b0b0dd0
--- /dev/null
+++ b/res/drawable/ic_check_box_checked.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ 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
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/stream_button_icon_size"
+ android:height="@dimen/stream_button_icon_size"
+ android:tint="@color/car_teal_700"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"
+ android:fillColor="#000000"/>
+</vector>
diff --git a/res/drawable/ic_check_box_unchecked.xml b/res/drawable/ic_check_box_unchecked.xml
new file mode 100644
index 0000000..fcfbace
--- /dev/null
+++ b/res/drawable/ic_check_box_unchecked.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ 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
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/stream_button_icon_size"
+ android:height="@dimen/stream_button_icon_size"
+ android:tint="@color/car_tint"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19,5v14H5V5h14m0,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"
+ android:fillColor="#000000"/>
+</vector>
diff --git a/res/layout/action_bar.xml b/res/layout/action_bar.xml
index 7646ed3..9dc897f 100644
--- a/res/layout/action_bar.xml
+++ b/res/layout/action_bar.xml
@@ -19,11 +19,20 @@
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">
+ android:gravity="end|center_vertical" >
+ <FrameLayout
+ android:id="@+id/action_bar_icon_container"
+ android:layout_width="@dimen/side_margin"
+ android:layout_height="@dimen/lens_header_height"
+ android:layout_alignParentStart="true">
+ <ImageView
+ style="@style/SettingIcon.ActionBar"/>
+ </FrameLayout>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/side_margin"
style="@style/CarTitle"
android:textColor="@color/car_teal_700"
android:layout_gravity="center_vertical"
diff --git a/res/layout/action_bar_with_button.xml b/res/layout/action_bar_with_button.xml
index e45cff8..1e14bfa 100644
--- a/res/layout/action_bar_with_button.xml
+++ b/res/layout/action_bar_with_button.xml
@@ -19,8 +19,16 @@
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">
+ android:gravity="center_vertical">
+ <FrameLayout
+ android:id="@+id/action_bar_icon_container"
+ android:layout_width="@dimen/side_margin"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true">
+ <ImageView
+ style="@style/SettingIcon.ActionBar"/>
+ </FrameLayout>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
@@ -30,6 +38,7 @@
android:gravity="center_vertical"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
+ android:layout_marginStart="@dimen/side_margin"
android:maxLines="1"
android:ellipsize="end"/>
@@ -37,6 +46,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
+ android:layout_gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/action_button2"
diff --git a/res/layout/action_bar_with_toggle.xml b/res/layout/action_bar_with_toggle.xml
index bb0af6a..1b7e335 100644
--- a/res/layout/action_bar_with_toggle.xml
+++ b/res/layout/action_bar_with_toggle.xml
@@ -20,6 +20,15 @@
android:layout_height="@dimen/lens_header_height"
android:gravity="center_vertical" >
+ <FrameLayout
+ android:id="@+id/action_bar_icon_container"
+ android:layout_width="@dimen/side_margin"
+ android:layout_height="@dimen/lens_header_height"
+ android:layout_alignParentStart="true">
+ <ImageView
+ style="@style/SettingIcon.ActionBar"/>
+ </FrameLayout>
+
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
@@ -29,14 +38,14 @@
android:layout_gravity="center_vertical"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
+ android:layout_marginStart="@dimen/side_margin"
android:maxLines="1"
android:ellipsize="end"/>
<Switch
android:id="@+id/toggle_switch"
android:background="@null"
- android:layout_width="@dimen/stream_button_icon_size"
- android:layout_height="@dimen/stream_button_icon_size"
+ style="@style/SettingSwitch"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/action_bar_end_widget_margin_end" />
diff --git a/res/layout/app_compat_activity.xml b/res/layout/app_compat_activity.xml
index 3569ac8..fa7b834 100644
--- a/res/layout/app_compat_activity.xml
+++ b/res/layout/app_compat_activity.xml
@@ -26,7 +26,11 @@
android:layout_width="match_parent"
android:layout_height="@dimen/lens_header_height"
app:theme="@style/ActionBarStyle.Car"
- app:contentInsetStart="@dimen/stream_content_keyline_1" />
+ app:contentInsetStart="0dp" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height"
+ android:background="@color/car_list_divider"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/layout/checkbox_line_item.xml b/res/layout/checkbox_line_item.xml
new file mode 100644
index 0000000..11addd3
--- /dev/null
+++ b/res/layout/checkbox_line_item.xml
@@ -0,0 +1,48 @@
+<?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:id="@+id/dashboard_tile"
+ style="@style/LineItem" >
+
+ <CheckBox
+ android:id="@+id/checkbox"
+ android:layout_width="@dimen/stream_button_icon_size"
+ android:layout_height="@dimen/stream_button_icon_size"
+ android:layout_marginStart="@dimen/stream_card_keyline_1"
+ android:button="@drawable/ic_check_box"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true" />
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_marginStart="@dimen/stream_card_keyline_3"
+ android:layout_marginEnd="@dimen/stream_card_keyline_3"
+ style="@style/CarBody2.SingleLine"
+ android:gravity="center_vertical"/>
+
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
+</RelativeLayout>
diff --git a/res/layout/icon_text_line_item.xml b/res/layout/icon_text_line_item.xml
index 0cc5262..773fb5f 100644
--- a/res/layout/icon_text_line_item.xml
+++ b/res/layout/icon_text_line_item.xml
@@ -22,6 +22,7 @@
android:id="@+id/icon"
android:layout_marginStart="@dimen/stream_card_keyline_1"
android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
style="@style/SettingIcon" />
<LinearLayout
android:layout_width="match_parent"
@@ -50,6 +51,13 @@
style="@style/SettingIcon"
android:layout_marginEnd="@dimen/stream_card_keyline_1"
android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
android:src="@drawable/ic_chevron_right"
- android:visibility="gone"/>
+ android:tint="@color/text_body_1"/>
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
</RelativeLayout>
diff --git a/res/layout/icon_toggle_line_item.xml b/res/layout/icon_toggle_line_item.xml
index 113c45d..08fce25 100644
--- a/res/layout/icon_toggle_line_item.xml
+++ b/res/layout/icon_toggle_line_item.xml
@@ -16,7 +16,6 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/dashboard_tile"
style="@style/LineItem" >
<ImageView
@@ -50,9 +49,14 @@
</LinearLayout>
<Switch
android:id="@+id/toggle_switch"
- style="@style/SettingIcon"
- android:layout_marginEnd="@dimen/stream_card_keyline_1"
+ style="@style/SettingSwitch"
android:layout_alignParentEnd="true"
- android:switchMinWidth="@dimen/stream_button_icon_size"
- android:visibility="gone"/>
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="@dimen/stream_card_keyline_1" />
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
</RelativeLayout>
diff --git a/res/layout/icon_widget_line_item.xml b/res/layout/icon_widget_line_item.xml
index 2e47a0a..77be271 100644
--- a/res/layout/icon_widget_line_item.xml
+++ b/res/layout/icon_widget_line_item.xml
@@ -47,7 +47,14 @@
style="@style/SettingIcon"
android:layout_marginEnd="@dimen/stream_card_keyline_1"
android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
android:src="@drawable/ic_settings_gear"
android:background="@null"
android:visibility="gone" />
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
</RelativeLayout>
diff --git a/res/layout/seekbar_line_item.xml b/res/layout/seekbar_line_item.xml
index 88df404..770dde5 100644
--- a/res/layout/seekbar_line_item.xml
+++ b/res/layout/seekbar_line_item.xml
@@ -15,19 +15,31 @@
~ limitations under the License
-->
-<LinearLayout
+<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/LineItem"
- android:layout_marginStart="@dimen/stream_card_keyline_1"
- android:layout_marginEnd="@dimen/stream_card_keyline_3"
- android:orientation="vertical" >
- <TextView
- android:id="@+id/title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/CarBody2.SingleLine" />
- <SeekBar
- android:id="@+id/seekbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
-</LinearLayout>
\ No newline at end of file
+ style="@style/LineItem" >
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_centerVertical="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginStart="@dimen/stream_card_keyline_1"
+ android:layout_marginEnd="@dimen/stream_card_keyline_3" >
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/CarBody2.SingleLine" />
+ <SeekBar
+ android:id="@+id/seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+ </LinearLayout>
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/text_line_item.xml b/res/layout/text_line_item.xml
index 98f1d3b..f9bda63 100644
--- a/res/layout/text_line_item.xml
+++ b/res/layout/text_line_item.xml
@@ -15,20 +15,42 @@
~ limitations under the License
-->
-<LinearLayout
+<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/LineItem"
- android:layout_marginStart="@dimen/stream_card_keyline_1"
- android:orientation="vertical" >
- <TextView
- android:id="@+id/title"
+ style="@style/LineItem" >
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/CarBody1.SingleLine" />
- <TextView
- android:id="@+id/desc"
+ android:orientation="vertical"
+ android:layout_centerVertical="true"
+ android:gravity="center_vertical"
+ android:layout_alignParentStart="true"
+ android:layout_marginStart="@dimen/stream_card_keyline_1"
+ android:layout_marginEnd="@dimen/stream_card_keyline_3" >
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/CarBody1.SingleLine" />
+ <TextView
+ android:id="@+id/desc"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/CarBody2.SingleLine"
+ android:layout_marginTop="@dimen/double_line_text_margin" />
+ </LinearLayout>
+ <ImageView
+ android:id="@+id/right_chevron"
+ style="@style/SettingIcon"
+ android:layout_marginEnd="@dimen/stream_card_keyline_1"
+ android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
+ android:src="@drawable/ic_chevron_right"
+ android:tint="@color/text_body_1"/>
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/double_line_text_margin"
- style="@style/CarBody2.SingleLine" />
-</LinearLayout>
\ No newline at end of file
+ android:layout_height="@dimen/car_divider_height" />
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/toggle_line_item.xml b/res/layout/toggle_line_item.xml
index b103af2..abd09df 100644
--- a/res/layout/toggle_line_item.xml
+++ b/res/layout/toggle_line_item.xml
@@ -42,8 +42,14 @@
</LinearLayout>
<Switch
android:id="@+id/toggle_switch"
- style="@style/SettingIcon"
+ style="@style/SettingSwitch"
android:layout_alignParentEnd="true"
- android:layout_marginEnd="@dimen/stream_card_keyline_1"
- android:switchMinWidth="@dimen/stream_button_icon_size"/>
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="@dimen/stream_card_keyline_1"/>
+ <View
+ android:id="@+id/line_item_divider"
+ android:layout_alignParentBottom="true"
+ android:background="@color/car_list_divider"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_divider_height" />
</com.android.car.settings.common.InterceptTouchRelativeLayout>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index adc0602..5e04b3f 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,7 +16,7 @@
<resources>
- <dimen name="icon_size">56dp</dimen>
+ <dimen name="switch_end_padding">5dp</dimen>
<dimen name="double_icon_size">112dp</dimen>
<dimen name="line_item_height">128dp</dimen>
<dimen name="side_margin">148dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 545c90c..f0cc501 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,17 +18,17 @@
<style name="LineItem">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/line_item_height</item>
- <item name="android:layout_gravity">center_vertical</item>
- <item name="android:gravity">center_vertical</item>
</style>
<style name="CarBody1.SingleLine" parent="@style/CarBody1">
<item name="android:maxLines">1</item>
+ <item name="android:textColor">@color/text_body_1</item>
<item name="android:ellipsize">marquee</item>
</style>
<style name="CarBody2.SingleLine" parent="@style/CarBody2">
<item name="android:maxLines">1</item>
+ <item name="android:textColor">@color/text_body_2</item>
<item name="android:ellipsize">end</item>
</style>
@@ -43,7 +43,6 @@
</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>
@@ -59,4 +58,20 @@
<item name="android:gravity">center_vertical</item>
<item name="android:scaleType">fitCenter</item>
</style>
+
+ <style name="SettingIcon.ActionBar" parent="SettingIcon">
+ <item name="android:tint">@color/car_teal_700</item>
+ <item name="android:layout_gravity">center</item>
+ <item name="android:src">@drawable/ic_arrow_back</item>
+ </style>
+
+ <style name="SettingSwitch">
+ <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:paddingEnd">@dimen/switch_end_padding</item>
+ <item name="android:scaleX">1.5</item>
+ <item name="android:scaleY">1.5</item>
+ <!--<item name="android:thumb">@drawable/ic_toggle_thumb</item>-->
+ <!--<item name="android:track">@drawable/ic_toggle_track</item>-->
+ </style>
</resources>
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
deleted file mode 100644
index c295f95..0000000
--- a/res/xml/display_settings.xml
+++ /dev/null
@@ -1,33 +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.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:title="@string/display_settings" >
-
- <SwitchPreference
- android:key="auto_brightness"
- android:title="@string/auto_brightness_title"
- android:summary="@string/auto_brightness_summary"/>
-
- <SeekBarPreference
- android:key="brightness"
- android:title="@string/brightness"
- android:max="255"
- app:min="0"
- app:showSeekBarValue="false"/>
-
-</PreferenceScreen>