OSDN Git Service

Fix several small layout and color issues
authorAlan Viverette <alanv@google.com>
Wed, 19 Nov 2014 19:59:24 +0000 (11:59 -0800)
committerAlan Viverette <alanv@google.com>
Wed, 19 Nov 2014 19:59:24 +0000 (11:59 -0800)
Adjusts switch track asset for consistent alignment across DPI buckets,
adjusts edit text background. Lightens the "Light" theme action bar
color so that it doesn't blend in with the action bar shadow.

BUG: 18430444
BUG: 18356558
BUG: 18390994
Change-Id: I1d1e26239fa0c921a65e4ec8b5df0b0093b3989c

core/res/res/drawable-hdpi/switch_track_mtrl_alpha.9.png
core/res/res/drawable-ldpi/switch_track_mtrl_alpha.9.png [deleted file]
core/res/res/drawable/edit_text_material.xml
core/res/res/values/colors_material.xml
core/res/res/values/dimens_material.xml

index 0ebe65e..9415bc0 100644 (file)
Binary files a/core/res/res/drawable-hdpi/switch_track_mtrl_alpha.9.png and b/core/res/res/drawable-hdpi/switch_track_mtrl_alpha.9.png differ
diff --git a/core/res/res/drawable-ldpi/switch_track_mtrl_alpha.9.png b/core/res/res/drawable-ldpi/switch_track_mtrl_alpha.9.png
deleted file mode 100644 (file)
index a58128f..0000000
Binary files a/core/res/res/drawable-ldpi/switch_track_mtrl_alpha.9.png and /dev/null differ
index bbc7301..38ac567 100644 (file)
 -->
 
 <inset xmlns:android="http://schemas.android.com/apk/res/android"
-        android:inset="@dimen/control_inset_material">
-    <ripple android:color="?attr/colorControlActivated">
+       android:insetLeft="@dimen/edit_text_inset_horizontal_material"
+       android:insetRight="@dimen/edit_text_inset_horizontal_material"
+       android:insetTop="@dimen/edit_text_inset_top_material"
+       android:insetBottom="@dimen/edit_text_inset_bottom_material">
+    <selector>
+        <item android:state_enabled="false">
+            <nine-patch android:src="@drawable/textfield_default_mtrl_alpha"
+                android:tint="?attr/colorControlNormal"
+                android:alpha="?attr/disabledAlpha" />
+        </item>
+        <item android:state_pressed="false" android:state_focused="false">
+            <nine-patch android:src="@drawable/textfield_default_mtrl_alpha"
+                android:tint="?attr/colorControlNormal" />
+        </item>
         <item>
-            <selector>
-                <item android:state_enabled="false">
-                    <nine-patch android:src="@drawable/textfield_default_mtrl_alpha"
-                        android:tint="?attr/colorControlNormal"
-                        android:alpha="?attr/disabledAlpha" />
-                </item>
-                <item>
-                    <nine-patch android:src="@drawable/textfield_default_mtrl_alpha"
-                        android:tint="?attr/colorControlNormal" />
-                </item>
-            </selector>
+            <nine-patch android:src="@drawable/textfield_activated_mtrl_alpha"
+                android:tint="?attr/colorControlActivated" />
         </item>
-        <item android:id="@+id/mask" android:drawable="@drawable/textfield_activated_mtrl_alpha" />
-    </ripple>
+    </selector>
 </inset>
index 46ec838..a8fd8d4 100644 (file)
@@ -22,7 +22,7 @@
     <color name="background_floating_material_light">#ffeeeeee</color>
 
     <color name="primary_material_dark">#ff212121</color>
-    <color name="primary_material_light">#ffe0e0e0</color>
+    <color name="primary_material_light">#ffefefef</color>
     <color name="primary_dark_material_dark">#ff000000</color>
     <color name="primary_dark_material_light">#ff757575</color>
 
index 4a2119b..e3672c8 100644 (file)
     <!-- Default rounded corner for controls -->
     <dimen name="control_corner_material">2dp</dimen>
 
+    <dimen name="edit_text_inset_horizontal_material">4dp</dimen>
+    <dimen name="edit_text_inset_top_material">4dp</dimen>
+    <dimen name="edit_text_inset_bottom_material">8dp</dimen>
+
     <dimen name="dialog_padding_material">24dp</dimen>
     <dimen name="dialog_padding_top_material">18dp</dimen>
 </resources>