OSDN Git Service

Fix bug 3360953 - Toasts use the holo theme in non-HC apps
authorAdam Powell <adamp@google.com>
Mon, 24 Jan 2011 05:15:23 +0000 (21:15 -0800)
committerAdam Powell <adamp@google.com>
Mon, 24 Jan 2011 05:15:23 +0000 (21:15 -0800)
Change-Id: Ic386b35ec47613655f4b17395090959f9031e3ad

core/res/res/drawable-hdpi/toast_frame.9.png
core/res/res/drawable-hdpi/toast_frame_holo.9.png [new file with mode: 0644]
core/res/res/drawable-mdpi/toast_frame.9.png
core/res/res/drawable-mdpi/toast_frame_holo.9.png [new file with mode: 0755]
core/res/res/layout/transient_notification.xml
core/res/res/values/attrs.xml
core/res/res/values/themes.xml

index 7f830bc..8f5d811 100644 (file)
Binary files a/core/res/res/drawable-hdpi/toast_frame.9.png and b/core/res/res/drawable-hdpi/toast_frame.9.png differ
diff --git a/core/res/res/drawable-hdpi/toast_frame_holo.9.png b/core/res/res/drawable-hdpi/toast_frame_holo.9.png
new file mode 100644 (file)
index 0000000..7f830bc
Binary files /dev/null and b/core/res/res/drawable-hdpi/toast_frame_holo.9.png differ
index 911f86d..08c4f86 100755 (executable)
Binary files a/core/res/res/drawable-mdpi/toast_frame.9.png and b/core/res/res/drawable-mdpi/toast_frame.9.png differ
diff --git a/core/res/res/drawable-mdpi/toast_frame_holo.9.png b/core/res/res/drawable-mdpi/toast_frame_holo.9.png
new file mode 100755 (executable)
index 0000000..911f86d
Binary files /dev/null and b/core/res/res/drawable-mdpi/toast_frame_holo.9.png differ
index 12b67f1..21d58aa 100644 (file)
@@ -22,7 +22,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:background="@drawable/toast_frame">
+    android:background="?android:attr/toastFrameBackground">
 
     <TextView
         android:id="@android:id/message"
index e76692a..c808a07 100755 (executable)
         <!-- Style for buttons without an explicit border, often used in groups. -->
         <attr name="borderlessButtonStyle" format="reference" />
 
+        <!-- Background to use for toasts -->
+        <attr name="toastFrameBackground" format="reference" />
+
         <!-- ============================ -->
         <!-- SearchView styles and assets -->
         <!-- ============================ -->
index 00d4b95..08542bf 100644 (file)
         <item name="alertDialogTheme">@android:style/Theme.Dialog.Alert</item>
         <item name="alertDialogCenterButtons">true</item>
         <item name="alertDialogIcon">@android:drawable/ic_dialog_alert</item>
+
+        <item name="toastFrameBackground">@android:drawable/toast_frame</item>
         
         <!-- Panel attributes -->
         <item name="panelBackground">@android:drawable/menu_background</item>
         <item name="alertDialogTheme">@android:style/Theme.Holo.Dialog.Alert</item>
         <item name="alertDialogCenterButtons">false</item>
         <item name="alertDialogIcon">@android:drawable/ic_dialog_alert_holo_dark</item>
+
+        <item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
         
         <!-- Panel attributes -->
         <item name="panelBackground">@android:drawable/menu_background</item>
         <item name="alertDialogCenterButtons">false</item>
         <item name="alertDialogTheme">@android:style/Theme.Holo.Light.Dialog.Alert</item>
         <item name="alertDialogIcon">@android:drawable/ic_dialog_alert_holo_light</item>
+
+        <item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
         
         <!-- Panel attributes -->
         <item name="panelBackground">@android:drawable/menu_background</item>