1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 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<resources>
18  <!-- Update to Theme.AppCompat.Light.NoActionBar once we no longer depend on ActionBars. -->
19  <style name="Dialer" parent="Theme.AppCompat.Light">
20    <!-- Used to automatically style all buttons in Dialer -->
21    <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
22    <item name="android:colorButtonNormal">?android:attr/colorPrimary</item>
23
24    <!-- Used to style link text -->
25    <item name="android:textColorLink">@color/dialer_theme_color</item>
26
27    <!-- Used to automatically style AlertDialogs -->
28    <item name="alertDialogTheme">@style/AlertDialogTheme</item>
29    <item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
30  </style>
31
32  <style name="Dialer.Dark" parent="Theme.AppCompat">
33    <!-- Used to automatically style all buttons in Dialer -->
34    <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
35    <item name="android:colorButtonNormal">?android:attr/colorPrimary</item>
36
37    <!-- Used to style link text -->
38    <item name="android:textColorLink">@color/dialer_theme_color</item>
39
40    <!-- Used to automatically style AlertDialogs -->
41    <item name="alertDialogTheme">@style/AlertDialogTheme</item>
42    <item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
43  </style>
44
45  <!-- Used to style all Dialer's button's text. Every button is awarded this for free if the parent
46     activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. -->
47  <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button">
48    <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
49  </style>
50
51  <!-- Used to style all Dialer's AlertDialogs. Every button is awarded this for free if the parent
52     activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. -->
53  <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
54    <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
55    <!-- TODO(a bug): figure out why ?android:attr/colorPrimary doesn't work here -->
56    <item name="android:colorAccent">@color/dialer_theme_color</item>
57    <item name="colorAccent">@color/dialer_theme_color</item>
58    <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
59    <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
60  </style>
61</resources>
62