Merge "No frame and margins for dialog style preference screens."

This commit is contained in:
Amith Yamasani
2010-12-21 14:34:30 -08:00
committed by Android (Google) Code Review
6 changed files with 30 additions and 7 deletions

View File

@@ -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"

View File

@@ -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">

View File

@@ -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>

View File

@@ -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 -->

View File

@@ -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 />

View File

@@ -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