OSDN Git Service

Update textview styles for better theme compatability.
authorDave Kover <kover@cyngn.com>
Sun, 31 Jan 2016 22:47:23 +0000 (14:47 -0800)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Mon, 8 Feb 2016 23:11:20 +0000 (15:11 -0800)
In the battery & notification lights preferences, the textview
attached to the custom color is locked to a color which is only
visible against light backgrounds. If a theme changes to a dark
theme, they are unreadable without modifying a core material
style.

Let's create a new style that points to a better material style
but also allows a themer to change it independently if needed.

Change-Id: I039f154282035c5123fddf8c20c18bdb3be90060
Ticket: CYNGNOS-1790

res/layout/preference_application_light.xml
res/values/cm_styles.xml

index 9f9135e..14cd4d3 100644 (file)
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="end"
-            android:textAppearance="@android:style/TextAppearance.Material.Notification.Line2" />
+            android:layout_marginEnd="6dp"
+            android:textAppearance="@style/TextAppearance.LightTimeValue" />
 
         <TextView
             android:id="@+id/textViewTimeOffValue"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="end"
-            android:textAppearance="@android:style/TextAppearance.Material.Notification.Line2" />
+            android:layout_marginEnd="6dp"
+            android:textAppearance="@style/TextAppearance.LightTimeValue" />
     </LinearLayout>
 
     <ImageView
index fa4f092..d7fbf0c 100644 (file)
@@ -40,4 +40,8 @@
         <item name="android:maxLines">1</item>
         <item name="android:layout_gravity">bottom</item>
     </style>
-</resources>
+
+    <!-- Style for Notification/Battery light text -->
+    <style name="TextAppearance.LightTimeValue" parent="@android:style/TextAppearance.Material.Caption" />
+
+</resources>
\ No newline at end of file