summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-06-16 21:16:11 -0700
committerAdam Powell <adamp@google.com>2011-06-17 11:56:53 -0700
commitc8834722d5591d1381dc199f04a544a6b11b74bd (patch)
tree6fed74150cb3805443bd8f047f31c4baf58c512d
parentf2288c960cce22ea3971d79f6aa13ed61c699176 (diff)
downloadframeworks_base-c8834722d5591d1381dc199f04a544a6b11b74bd.zip
frameworks_base-c8834722d5591d1381dc199f04a544a6b11b74bd.tar.gz
frameworks_base-c8834722d5591d1381dc199f04a544a6b11b74bd.tar.bz2
Create theme attributes for small and large
listPreferredItemHeight. Change default holo dialog list items to use them. Tweak dialog button bar style. Change-Id: I9bf14621aea44b8b7d60c290ecea86e6284ccdaa
-rw-r--r--api/current.txt2
-rw-r--r--core/res/res/layout/select_dialog_item_holo.xml2
-rw-r--r--core/res/res/layout/select_dialog_multichoice_holo.xml2
-rw-r--r--core/res/res/layout/select_dialog_singlechoice_holo.xml2
-rwxr-xr-xcore/res/res/values/attrs.xml7
-rw-r--r--core/res/res/values/public.xml2
-rw-r--r--core/res/res/values/styles.xml2
-rw-r--r--core/res/res/values/themes.xml12
8 files changed, 24 insertions, 7 deletions
diff --git a/api/current.txt b/api/current.txt
index 12d9cc2..5f69547 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -627,6 +627,8 @@ package android {
field public static final int listDividerAlertDialog = 16843525; // 0x1010305
field public static final int listPopupWindowStyle = 16843519; // 0x10102ff
field public static final int listPreferredItemHeight = 16842829; // 0x101004d
+ field public static final int listPreferredItemHeightLarge = 16843670; // 0x1010396
+ field public static final int listPreferredItemHeightSmall = 16843671; // 0x1010397
field public static final int listSelector = 16843003; // 0x10100fb
field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208
field public static final int listViewStyle = 16842868; // 0x1010074
diff --git a/core/res/res/layout/select_dialog_item_holo.xml b/core/res/res/layout/select_dialog_item_holo.xml
index 396092e..0c700cf 100644
--- a/core/res/res/layout/select_dialog_item_holo.xml
+++ b/core/res/res/layout/select_dialog_item_holo.xml
@@ -26,7 +26,7 @@
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorAlertDialogListItem"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/select_dialog_multichoice_holo.xml b/core/res/res/layout/select_dialog_multichoice_holo.xml
index 8027035..683151c 100644
--- a/core/res/res/layout/select_dialog_multichoice_holo.xml
+++ b/core/res/res/layout/select_dialog_multichoice_holo.xml
@@ -18,7 +18,7 @@
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorAlertDialogListItem"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/select_dialog_singlechoice_holo.xml b/core/res/res/layout/select_dialog_singlechoice_holo.xml
index cab519f..52782d0 100644
--- a/core/res/res/layout/select_dialog_singlechoice_holo.xml
+++ b/core/res/res/layout/select_dialog_singlechoice_holo.xml
@@ -18,7 +18,7 @@
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorAlertDialogListItem"
android:gravity="center_vertical"
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 9c25ace..b805fc7 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -202,9 +202,14 @@
<!-- The preferred list item height. -->
<attr name="listPreferredItemHeight" format="dimension" />
- <!-- The drawable for the list divider. -->
+ <!-- A smaller, sleeker list item height. -->
+ <attr name="listPreferredItemHeightSmall" format="dimension" />
+ <!-- A larger, more robust list item height. -->
+ <attr name="listPreferredItemHeightLarge" format="dimension" />
<!-- The list item height for search results. @hide -->
<attr name="searchResultListItemHeight" format="dimension" />
+
+ <!-- The drawable for the list divider. -->
<attr name="listDivider" format="reference" />
<!-- The list divider used in alert dialogs. -->
<attr name="listDividerAlertDialog" format="reference" />
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index be2997e..d67a146 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1766,6 +1766,8 @@
<public type="attr" name="feedbackCount" />
<public type="attr" name="verticalOffset" />
<public type="attr" name="horizontalOffset" />
+ <public type="attr" name="listPreferredItemHeightLarge" />
+ <public type="attr" name="listPreferredItemHeightSmall" />
<public type="style" name="Widget.Holo.Button.Borderless.Small" />
<public type="style" name="Widget.Holo.Light.Button.Borderless.Small" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 6e80326..c20d5ec 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1496,6 +1496,7 @@
<style name="Holo.ButtonBar.AlertDialog">
<item name="android:background">@null</item>
+ <item name="android:dividerPadding">0dp</item>
</style>
<style name="Widget.Holo.TextView" parent="Widget.TextView">
@@ -1905,6 +1906,7 @@
<style name="Holo.Light.ButtonBar.AlertDialog">
<item name="android:background">@null</item>
+ <item name="android:dividerPadding">0dp</item>
</style>
<style name="Holo.Light.SegmentedButton" parent="SegmentedButton">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 4a43e32..2ab2c04 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -95,7 +95,9 @@
<!-- List attributes -->
<item name="listPreferredItemHeight">64dip</item>
- <item name="dropdownListPreferredItemHeight">64dip</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeight</item>
+ <item name="dropdownListPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
<!-- @hide -->
<item name="searchResultListItemHeight">58dip</item>
@@ -861,7 +863,9 @@
<!-- List attributes -->
<item name="listPreferredItemHeight">64dip</item>
- <item name="dropdownListPreferredItemHeight">48dip</item>
+ <item name="listPreferredItemHeightSmall">48dip</item>
+ <item name="listPreferredItemHeightLarge">80dip</item>
+ <item name="dropdownListPreferredItemHeight">?android:attr/listPreferredItemHeightSmall</item>
<!-- @hide -->
<item name="searchResultListItemHeight">58dip</item>
@@ -1150,7 +1154,9 @@
<!-- List attributes -->
<item name="listPreferredItemHeight">64dip</item>
- <item name="dropdownListPreferredItemHeight">48dip</item>
+ <item name="listPreferredItemHeightSmall">48dip</item>
+ <item name="listPreferredItemHeightLarge">80dip</item>
+ <item name="dropdownListPreferredItemHeight">?android:attr/listPreferredItemHeightSmall</item>
<!-- @hide -->
<item name="searchResultListItemHeight">58dip</item>