diff options
author | Adam Powell <adamp@google.com> | 2010-10-14 17:54:40 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2010-10-15 18:30:22 -0700 |
commit | 84321b2bed38753665adfda0ac14a508173362e0 (patch) | |
tree | 77275ba8fb65e84f5d5c5dfc5d674e22b6d703d1 /core/res | |
parent | e2cb1f005350cf1116d49dbe9456a2cafb1ec8dc (diff) | |
download | frameworks_base-84321b2bed38753665adfda0ac14a508173362e0.zip frameworks_base-84321b2bed38753665adfda0ac14a508173362e0.tar.gz frameworks_base-84321b2bed38753665adfda0ac14a508173362e0.tar.bz2 |
Change AlertDialogs to use button groups.
Ditch dumb prototype implementation of ButtonGroup.
Change-Id: I803ef51b0bf4059936ddeb9145ca37ee53cd24b9
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png | bin | 0 -> 176 bytes | |||
-rw-r--r-- | core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png | bin | 0 -> 182 bytes | |||
-rw-r--r-- | core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png | bin | 0 -> 176 bytes | |||
-rw-r--r-- | core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png | bin | 0 -> 182 bytes | |||
-rw-r--r-- | core/res/res/layout-xlarge/alert_dialog.xml | 5 | ||||
-rw-r--r-- | core/res/res/layout/alert_dialog.xml | 5 | ||||
-rwxr-xr-x | core/res/res/values/attrs.xml | 1 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 1 | ||||
-rw-r--r-- | core/res/res/values/styles.xml | 13 | ||||
-rw-r--r-- | core/res/res/values/themes.xml | 5 |
10 files changed, 23 insertions, 7 deletions
diff --git a/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png Binary files differnew file mode 100644 index 0000000..77b0999 --- /dev/null +++ b/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png Binary files differnew file mode 100644 index 0000000..3fde76e --- /dev/null +++ b/core/res/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png Binary files differnew file mode 100644 index 0000000..77b0999 --- /dev/null +++ b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png Binary files differnew file mode 100644 index 0000000..3fde76e --- /dev/null +++ b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png diff --git a/core/res/res/layout-xlarge/alert_dialog.xml b/core/res/res/layout-xlarge/alert_dialog.xml index 5291e9d..82b4509 100644 --- a/core/res/res/layout-xlarge/alert_dialog.xml +++ b/core/res/res/layout-xlarge/alert_dialog.xml @@ -107,7 +107,8 @@ android:layout_height="wrap_content" android:minHeight="54dip" android:orientation="vertical" > - <LinearLayout + <ButtonGroup + style="?android:attr/alertDialogButtonGroupStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" @@ -145,6 +146,6 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:visibility="gone" /> - </LinearLayout> + </ButtonGroup> </LinearLayout> </com.android.internal.widget.WeightedLinearLayout> diff --git a/core/res/res/layout/alert_dialog.xml b/core/res/res/layout/alert_dialog.xml index 541d84d..3982ed9 100644 --- a/core/res/res/layout/alert_dialog.xml +++ b/core/res/res/layout/alert_dialog.xml @@ -106,7 +106,8 @@ android:layout_height="wrap_content" android:minHeight="54dip" android:orientation="vertical" > - <LinearLayout + <ButtonGroup + style="?android:attr/alertDialogButtonGroupStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" @@ -144,6 +145,6 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:visibility="gone" /> - </LinearLayout> + </ButtonGroup> </LinearLayout> </com.android.internal.widget.WeightedLinearLayout> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 578191a..b419a91 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -347,6 +347,7 @@ <!-- ============ --> <eat-comment /> <attr name="alertDialogStyle" format="reference" /> + <attr name="alertDialogButtonGroupStyle" format="reference" /> <!-- ============ --> <!-- Panel styles --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index da068dc..2490c0f 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1369,6 +1369,7 @@ <public type="attr" name="textLineHeight" /> <public type="attr" name="dividerVertical" /> <public type="attr" name="buttonGroupStyle" /> + <public type="attr" name="alertDialogButtonGroupStyle" /> <public type="anim" name="animator_fade_in" /> <public type="anim" name="animator_fade_out" /> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 4deb97d..2ecb4d0 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -994,9 +994,8 @@ </style> <style name="Widget.ButtonGroup"> - <item name="divider">?android:attr/dividerVertical</item> <item name="buttonBackground">?android:attr/groupButtonBackground</item> - <item name="showDividers">middle</item> + <item name="showDividers"></item> </style> <!-- Begin Holo theme styles --> @@ -1275,6 +1274,12 @@ </style> <style name="Widget.Holo.ButtonGroup" parent="Widget.ButtonGroup"> + <item name="divider">?android:attr/dividerVertical</item> + <item name="showDividers">middle</item> + </style> + + <style name="Widget.Holo.ButtonGroup.AlertDialog"> + <item name="android:background">@android:drawable/dialog_divider_horizontal_holo_dark</item> </style> <style name="Widget.Holo.TextView" parent="Widget.TextView"> @@ -1540,6 +1545,10 @@ <style name="Widget.Holo.Light.ButtonGroup" parent="Widget.Holo.ButtonGroup"> </style> + <style name="Widget.Holo.Light.ButtonGroup.AlertDialog"> + <item name="android:background">@android:drawable/dialog_divider_horizontal_holo_light</item> + </style> + <style name="Widget.Holo.Light.TextView" parent="Widget.TextView"> </style> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 9dbb1de..06c502b 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -89,7 +89,7 @@ <item name="buttonStyleToggle">@android:style/Widget.Button.Toggle</item> - <item name="groupButtonBackground">?android:attr/listChoiceBackgroundIndicator</item> + <item name="groupButtonBackground">@android:drawable/btn_default</item> <!-- List attributes --> <item name="listPreferredItemHeight">64dip</item> @@ -141,6 +141,7 @@ <item name="alertDialogStyle">@android:style/AlertDialog</item> <item name="dialogTheme">@android:style/Theme.Dialog</item> <item name="alertDialogTheme">@android:style/Theme.Dialog.Alert</item> + <item name="alertDialogButtonGroupStyle">?android:attr/buttonGroupStyle</item> <!-- Panel attributes --> <item name="panelBackground">@android:drawable/menu_background</item> @@ -743,6 +744,7 @@ <item name="alertDialogStyle">@android:style/AlertDialog.Holo</item> <item name="dialogTheme">@android:style/Theme.Holo.Dialog</item> <item name="alertDialogTheme">@android:style/Theme.Holo.Dialog.Alert</item> + <item name="alertDialogButtonGroupStyle">@android:style/Widget.Holo.ButtonGroup.AlertDialog</item> <!-- Panel attributes --> <item name="panelBackground">@android:drawable/menu_background</item> @@ -972,6 +974,7 @@ <item name="alertDialogStyle">@android:style/AlertDialog.Holo.Light</item> <item name="dialogTheme">@android:style/Theme.Holo.Light.Dialog</item> <item name="alertDialogTheme">@android:style/Theme.Holo.Light.Dialog.Alert</item> + <item name="alertDialogButtonGroupStyle">@android:style/Widget.Holo.Light.ButtonGroup.AlertDialog</item> <!-- Panel attributes --> <item name="panelBackground">@android:drawable/menu_background</item> |