Update OMS patches
[GitHub/Stricted/android_vendor_extra.git] / patches / packages / apps / Settings / 0002-Settings-Expose-condition-card-colors.patch
1 From 59d8f9a2b5afc91026a29708239e994d6166d677 Mon Sep 17 00:00:00 2001
2 From: daveyannihilation <daveyannihilation@hotmail.com>
3 Date: Tue, 20 Sep 2016 23:35:04 +0800
4 Subject: [PATCH 02/20] Settings: Expose condition card colors
5
6 PS2 Change to the actual colors in fwb that these attrs call to.
7
8 @nathanchance edit: updated for Nougat 7.1
9
10 Change-Id: I8de2e2a4f79a28c0fe1f025b4d23937931fe293a
11 ---
12 res/layout/condition_card.xml | 16 ++++++++--------
13 res/values/projekt_colors.xml | 9 +++++++++
14 2 files changed, 17 insertions(+), 8 deletions(-)
15
16 diff --git a/res/layout/condition_card.xml b/res/layout/condition_card.xml
17 index 7c9e46da00..a5eb6c85cf 100644
18 --- a/res/layout/condition_card.xml
19 +++ b/res/layout/condition_card.xml
20 @@ -25,7 +25,7 @@
21 android:layout_width="match_parent"
22 android:layout_height="wrap_content"
23 android:orientation="vertical"
24 - android:background="?android:attr/colorAccent"
25 + android:background="@color/condition_card_background_color"
26 android:elevation="2dp"
27 android:clickable="true"
28 android:focusable="true">
29 @@ -44,7 +44,7 @@
30 android:layout_height="wrap_content"
31 android:layout_marginStart="16dp"
32 android:layout_marginEnd="32dp"
33 - android:tint="?android:attr/textColorPrimaryInverse" />
34 + android:tint="@color/condition_card_icon_color" />
35
36 <TextView
37 android:id="@android:id/title"
38 @@ -52,14 +52,14 @@
39 android:layout_height="wrap_content"
40 android:layout_weight="1"
41 android:textAppearance="?android:attr/textAppearanceMedium"
42 - android:textColor="?android:attr/textColorPrimaryInverse" />
43 + android:textColor="@color/condition_card_title_text_color" />
44
45 <ImageView
46 android:id="@+id/expand_indicator"
47 android:layout_width="wrap_content"
48 android:layout_height="match_parent"
49 android:padding="16dp"
50 - android:tint="?android:attr/textColorPrimaryInverse"/>
51 + android:tint="@color/condition_card_expander_color" />
52
53 </LinearLayout>
54
55 @@ -81,14 +81,14 @@
56 android:paddingBottom="16dp"
57 android:textAppearance="?android:attr/textAppearanceListItemSecondary"
58 android:alpha=".7"
59 - android:textColor="?android:attr/textColorPrimaryInverse" />
60 + android:textColor="@color/condition_card_summary_text_color" />
61
62 <!-- TODO: Better background -->
63 <View
64 android:id="@+id/divider"
65 android:layout_width="match_parent"
66 android:layout_height=".25dp"
67 - android:background="@android:color/white" />
68 + android:background="@color/condition_card_divider_color" />
69
70 <com.android.internal.widget.ButtonBarLayout
71 android:id="@+id/buttonBar"
72 @@ -107,7 +107,7 @@
73 android:paddingStart="0dp"
74 android:alpha=".8"
75 android:textAlignment="viewStart"
76 - android:textColor="?android:attr/textColorPrimaryInverse"
77 + android:textColor="@color/condition_card_first_button_text_color"
78 style="?android:attr/buttonBarButtonStyle" />
79
80 <Button
81 @@ -117,7 +117,7 @@
82 android:layout_weight="1"
83 android:alpha=".8"
84 android:textAlignment="viewStart"
85 - android:textColor="?android:attr/textColorPrimaryInverse"
86 + android:textColor="@color/condition_card_second_button_text_color"
87 style="?android:attr/buttonBarButtonStyle" />
88
89 </com.android.internal.widget.ButtonBarLayout>
90 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
91 index c30d7eda21..ea54a02a24 100644
92 --- a/res/values/projekt_colors.xml
93 +++ b/res/values/projekt_colors.xml
94 @@ -18,4 +18,13 @@
95 <!-- Dashboard category and tile background -->
96 <color name="dashboard_category_title_background">@color/card_background</color>
97 <color name="selectable_card_background">@color/card_background</color>
98 + <!-- Condition card colors -->
99 + <color name="condition_card_background_color">@*android:color/accent_device_default_light</color>
100 + <color name="condition_card_icon_color">@*android:color/primary_text_default_material_dark</color>
101 + <color name="condition_card_title_text_color">@*android:color/primary_text_default_material_dark</color>
102 + <color name="condition_card_expander_color">@*android:color/primary_text_default_material_dark</color>
103 + <color name="condition_card_summary_text_color">@*android:color/primary_text_default_material_dark</color>
104 + <color name="condition_card_divider_color">@android:color/white</color>
105 + <color name="condition_card_first_button_text_color">@*android:color/primary_text_default_material_dark</color>
106 + <color name="condition_card_second_button_text_color">@*android:color/primary_text_default_material_dark</color>
107 </resources>
108 --
109 2.11.1
110