1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright 2018 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<resources>
19
20    <!-- TODO: the whole theme will be moved to platforms >= API 28 so that we have a single place
21    on device to control colors and fonts across all apps. -->
22
23    <style name="PreferenceThemeOverlayLeanbackBase" >
24        <!-- settings panel background color -->
25        <item name="android:windowBackground">@color/default_preference_window_background</item>
26
27        <!-- settings title panel background color -->
28        <item name="android:colorPrimary">@color/default_preference_brand_color</item>
29
30        <!-- colorAccent is normally used for category, checkbox, switch and seekbar -->
31        <item name="android:colorAccent">@color/default_preference_color_accent</item>
32
33        <!-- text appearance for Settings panel main title, it by default reference titleTextColor for text color -->
34        <item name="android:titleTextAppearance">@style/TextAppearance.LeanbackPreference.Title.V23</item>
35
36        <!-- text appearance for Settings panel 2nd title below main title, it by default reference subtitleTextColor for text color -->
37        <item name="android:subtitleTextAppearance">@style/TextAppearance.LeanbackPreference.SubTitle.V23</item>
38
39        <!-- text appearance for item text, it by default reference textColorPrimary for text color -->
40        <item name="android:textAppearanceListItem">@style/TextAppearance.LeanbackPreference.ListItem</item>
41
42        <!-- text appearance for item second text, it by default reference textColorSecondary for text color -->
43        <item name="android:textAppearanceListItemSecondary">@style/TextAppearance.LeanbackPreference.ListItem.Secondary</item>
44
45        <!-- text appearance for category, it by default reference colorAccent for text color -->
46        <item name="android:textAppearanceListItemSmall">@style/TextAppearance.LeanbackPreference.Category</item>
47
48        <!-- padding start for each item -->
49        <item name="android:listPreferredItemPaddingStart">@dimen/lb_preference_item_padding_start</item>
50
51        <!-- padding end for each item -->
52        <item name="android:listPreferredItemPaddingEnd">@dimen/lb_preference_item_padding_end</item>
53
54        <!-- color for title text -->
55        <item name="android:titleTextColor">?android:attr/textColorPrimary</item>
56
57        <!-- color for subtitle text -->
58        <item name="android:subtitleTextColor">?android:attr/textColorPrimary</item>
59
60        <!-- color for item text -->
61        <item name="android:textColorPrimary">@color/lb_preference_item_primary_text_color</item>
62
63        <!-- color for item second text -->
64        <item name="android:textColorSecondary">@color/lb_preference_item_secondary_text_color</item>
65
66        <!-- color for category text by default is colorAccent -->
67        <item name="android:textColorTertiary">?android:attr/colorAccent</item>
68
69        <!-- android:colorControlNormal is color of unchecked checkbox and radio, seekbar's track it is by default same as textColorPrimary -->
70        <item name="android:colorControlNormal">@color/lb_preference_item_primary_text_color_default</item>
71
72        <!-- android:colorControlActivated normally uses the "blue" colorAccent for checkbox, switch, seekbar, etc -->
73        <item name="android:colorControlActivated">?android:attr/colorAccent</item>
74
75        <!-- style of window title TextView -->
76        <item name="android:titleTextStyle">@style/LeanbackPreference.Title</item>
77
78        <!-- style of subtitle for Dialog -->
79        <item name="android:subtitleTextStyle">@style/LeanbackPreference.SubTitle</item>
80
81        <!-- style of EditText for EditTextPreference -->
82        <item name="android:editTextStyle">@style/LeanbackPreference.EditText</item>
83
84        <!-- style for the icon-->
85        <item name="android:imageButtonStyle">@null</item>
86
87        <item name="android:checkboxStyle">@android:style/Widget.Material.CompoundButton.CheckBox</item>
88
89        <item name="android:radioButtonStyle">@android:style/Widget.Material.CompoundButton.RadioButton</item>
90
91        <item name="android:switchStyle">@style/LeanbackSwitchCompatStyle</item>
92
93        <item name="android:seekBarStyle">@android:style/Widget.Material.SeekBar</item>
94
95    </style>
96
97    <!-- Extends Switch style to SwitchCompat. -->
98    <style name="LeanbackSwitchCompatStyle" parent="@android:style/Widget.Material.CompoundButton.Switch">
99        <item name="showText">false</item>
100        <item name="track">@drawable/leanback_switch_compat_track</item>
101    </style>
102
103</resources>