diff options
| -rw-r--r-- | core/res/res/layout-xlarge/preference_list_content_single.xml | 8 | ||||
| -rw-r--r-- | core/res/res/values-large/themes.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values-xlarge/styles.xml | 8 | ||||
| -rwxr-xr-x | core/res/res/values/attrs.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values/styles.xml | 14 | ||||
| -rw-r--r-- | core/res/res/values/themes.xml | 3 |
6 files changed, 30 insertions, 7 deletions
diff --git a/core/res/res/layout-xlarge/preference_list_content_single.xml b/core/res/res/layout-xlarge/preference_list_content_single.xml index 6899ed07cea9..672599646946 100644 --- a/core/res/res/layout-xlarge/preference_list_content_single.xml +++ b/core/res/res/layout-xlarge/preference_list_content_single.xml @@ -30,18 +30,14 @@ <LinearLayout android:id="@+id/headers" + style="?attr/preferencePanelStyle" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginRight="@dimen/preference_screen_side_margin" - android:layout_marginLeft="@dimen/preference_screen_side_margin" - android:layout_marginTop="48dp" - android:layout_marginBottom="48dp" android:paddingLeft="32dip" android:paddingRight="32dip" android:paddingTop="32dip" - android:paddingBottom="32dip" - android:background="?attr/preferencePanelBackground"> + android:paddingBottom="32dip" > <ListView android:id="@android:id/list" android:layout_width="match_parent" diff --git a/core/res/res/values-large/themes.xml b/core/res/res/values-large/themes.xml index 12257a15c95e..f5c35f63100b 100644 --- a/core/res/res/values-large/themes.xml +++ b/core/res/res/values-large/themes.xml @@ -19,9 +19,11 @@ <resources> <style name="Theme.Holo.DialogWhenLarge" parent="@android:style/Theme.Holo.Dialog"> + <item name="preferencePanelStyle">@style/PreferencePanel.Dialog</item> </style> <style name="Theme.Holo.DialogWhenLarge.NoActionBar" parent="@android:style/Theme.Holo.Dialog.NoActionBar"> + <item name="preferencePanelStyle">@style/PreferencePanel.Dialog</item> </style> <style name="Theme.Holo.Light.DialogWhenLarge" parent="@android:style/Theme.Holo.Light.Dialog"> diff --git a/core/res/res/values-xlarge/styles.xml b/core/res/res/values-xlarge/styles.xml index 095a83daac09..489e5309a393 100644 --- a/core/res/res/values-xlarge/styles.xml +++ b/core/res/res/values-xlarge/styles.xml @@ -34,5 +34,13 @@ <style name="TextAppearance.StatusBar.EventContent.Title"> <item name="android:textColor">?android:attr/textColorPrimary</item> </style> + + <style name="PreferencePanel"> + <item name="android:layout_marginLeft">@dimen/preference_screen_side_margin</item> + <item name="android:layout_marginRight">@dimen/preference_screen_side_margin</item> + <item name="android:layout_marginTop">48dip</item> + <item name="android:layout_marginBottom">48dip</item> + <item name="android:background">?attr/preferencePanelBackground</item> + </style> </resources> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 9598f961090c..36830ce72f55 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -606,6 +606,8 @@ <attr name="preferenceLayoutChild" format="reference" /> <!-- Preference panel background --> <attr name="preferencePanelBackground" format="reference" /> + <!-- Preference panel style --> + <attr name="preferencePanelStyle" format="reference" /> <!-- ============================ --> <!-- Text selection handle styles --> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 9e21111de991..9c28922b233d 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -915,6 +915,20 @@ <item name="android:widgetLayout">@android:layout/preference_dialog</item> </style> + <!-- No margins or background by default. Could be different for x-large screens --> + <style name="PreferencePanel"> + </style> + + <!-- The attributes are overridden here because the x-large or large resources may have + changed the margins and background in the parent PreferencePanel style. --> + <style name="PreferencePanel.Dialog"> + <item name="android:layout_marginLeft">0dip</item> + <item name="android:layout_marginRight">0dip</item> + <item name="android:layout_marginTop">0dip</item> + <item name="android:layout_marginBottom">0dip</item> + <item name="android:background">@null</item> + </style> + <!-- Other Misc Styles --> <eat-comment /> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 87029ef84f22..1bbe22ebccfe 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -234,6 +234,7 @@ <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> + <item name="preferencePanelStyle">@style/PreferencePanel</item> <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_dark</item> <!-- Search widget styles --> @@ -1306,7 +1307,7 @@ (large, xlarge). --> <style name="Theme.Holo.DialogWhenLarge.NoActionBar" parent="@android:style/Theme.Holo.NoActionBar"> </style> - + <!-- Light holo dialog themes --> <!-- Holo light theme for dialog windows and activities, which is used by the |