summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/layout/car_default_app_frame.xml55
-rw-r--r--res/values/attrs.xml4
-rw-r--r--res/values/dimens.xml5
-rw-r--r--res/values/styles.xml17
-rw-r--r--res/values/themes.xml16
5 files changed, 97 insertions, 0 deletions
diff --git a/res/layout/car_default_app_frame.xml b/res/layout/car_default_app_frame.xml
new file mode 100644
index 00000000..2fe0856e
--- /dev/null
+++ b/res/layout/car_default_app_frame.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2019 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:orientation="vertical">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_action_bar_height"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+ <FrameLayout
+ android:id="@+id/back_button"
+ android:layout_width="@dimen/car_margin"
+ android:layout_height="match_parent">
+ <ImageView
+ android:layout_width="@dimen/car_icon_size"
+ android:layout_height="@dimen/car_icon_size"
+ android:layout_gravity="center"
+ android:scaleType="fitCenter"
+ android:src="@drawable/ic_arrow_back"
+ android:tint="?android:attr/textColorPrimary"/>
+ </FrameLayout>
+
+ <TextView
+ android:id="@+id/label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceLarge"/>
+ </LinearLayout>
+
+ <FrameLayout
+ android:id="@android:id/list_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingEnd="@dimen/car_margin"
+ android:paddingStart="@dimen/car_margin"/>
+</LinearLayout>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index e220f4c8..f8144d74 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -32,4 +32,8 @@
<attr name="circle_radius_pressed_percent" format="fraction" />
</declare-styleable>
<!-- END: Ported from WearableSupport -->
+
+ <!-- START: Car Settings Preferences -->
+ <attr name="carDividerColor" format="color"/>
+ <!-- END: Car Settings Preferences -->
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index bac131a6..04ec00ce 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -54,4 +54,9 @@
<dimen name="incident_image_width">150dp</dimen>
<dimen name="incident_image_height">200dp</dimen>
+ <!-- Auto related dimensions -->
+ <dimen name="car_action_bar_height">@*android:dimen/car_app_bar_height</dimen>
+ <dimen name="car_margin">@*android:dimen/car_margin</dimen>
+ <dimen name="car_icon_size">@*android:dimen/car_primary_icon_size</dimen>
+
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 9da063d7..b8fbc380 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -858,4 +858,21 @@
<!-- END ACCESSIBILITY SERVICE DIALOG ITEM -->
+ <!-- START CAR SETTINGS PREFERENCE STYLES -->
+
+ <style name="CarPreferenceFragment">
+ <item name="android:layout">@layout/car_default_app_frame</item>
+ </style>
+
+ <style name="CarPreferenceFragmentList">
+ <item name="android:paddingTop">0dp</item>
+ <item name="android:paddingBottom">0dp</item>
+ <item name="android:paddingStart">0dp</item>
+ <item name="android:paddingEnd">0dp</item>
+ <item name="android:paddingLeft">0dp</item>
+ <item name="android:paddingRight">0dp</item>
+ </style>
+
+ <!-- END CAR SETTINGS PREFERENCE STYLES -->
+
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 4dd6e326..848cd78a 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -22,6 +22,12 @@
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="preferenceCategoryTitleTextAppearance">@style/TextAppearance.CategoryTitle</item>
</style>
+
+ <style name="Settings.NoActionBar" parent="Settings">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
<style name="TextAppearance.CategoryTitle"
parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:textAllCaps">true</item>
@@ -78,4 +84,14 @@
parent="@android:style/Theme.DeviceDefault.Light.Dialog.NoActionBar">
</style>
+ <style name="CarSettings" parent="Settings.NoActionBar">
+ <item name="preferenceTheme">@style/CarPreferenceTheme</item>
+ <item name="carDividerColor">@*android:color/car_list_divider</item>
+ </style>
+
+ <style name="CarPreferenceTheme">
+ <item name="preferenceFragmentCompatStyle">@style/CarPreferenceFragment</item>
+ <item name="preferenceFragmentListStyle">@style/CarPreferenceFragmentList</item>
+ </style>
+
</resources>