Merge "Fix preference layouts so that custom preferences don't break."
This commit is contained in:
committed by
Android (Google) Code Review
commit
7b6d85013b
@@ -24,9 +24,13 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/preference_widget_width"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="@dimen/preference_widget_width"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -54,12 +58,5 @@
|
||||
android:maxLines="4" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -22,9 +22,13 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/preference_widget_width"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="@dimen/preference_widget_width"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -54,11 +58,4 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -15,52 +15,9 @@
|
||||
-->
|
||||
|
||||
<!-- Layout used by DialogPreference in a PreferenceActivity. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize">
|
||||
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="@dimen/preference_widget_width"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" >
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/btn_circle"
|
||||
android:src="@drawable/ic_btn_round_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView android:id="@+android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView android:id="@+android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@android:id/title"
|
||||
android:layout_alignLeft="@android:id/title"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="4" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/btn_circle"
|
||||
android:src="@drawable/ic_btn_round_more" />
|
||||
|
||||
@@ -16,54 +16,10 @@
|
||||
|
||||
<!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
|
||||
inside android.R.layout.preference. -->
|
||||
<!-- Layout used by DialogPreference in a PreferenceActivity. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize">
|
||||
|
||||
<!-- Preference should place its actual preference widget here. -->
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="@dimen/preference_widget_width"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" >
|
||||
<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView android:id="@+android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView android:id="@+android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@android:id/title"
|
||||
android:layout_alignLeft="@android:id/title"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="4" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_gravity="center"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
||||
|
||||
@@ -818,18 +818,18 @@
|
||||
<item name="android:shouldDisableView">false</item>
|
||||
<item name="android:selectable">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Preference.CheckBoxPreference">
|
||||
<item name="android:layout">@android:layout/preference_widget_checkbox</item>
|
||||
<item name="android:widgetLayout">@android:layout/preference_widget_checkbox</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Preference.PreferenceScreen">
|
||||
</style>
|
||||
|
||||
<style name="Preference.DialogPreference">
|
||||
<item name="android:positiveButtonText">@android:string/ok</item>
|
||||
<item name="android:negativeButtonText">@android:string/cancel</item>
|
||||
<item name="android:layout">@android:layout/preference_dialog</item>
|
||||
<item name="android:widgetLayout">@android:layout/preference_dialog</item>
|
||||
</style>
|
||||
|
||||
<style name="Preference.DialogPreference.YesNoPreference">
|
||||
@@ -845,7 +845,7 @@
|
||||
<item name="android:ringtoneType">ringtone</item>
|
||||
<item name="android:showSilent">true</item>
|
||||
<item name="android:showDefault">true</item>
|
||||
<item name="android:layout">@android:layout/preference_dialog</item>
|
||||
<item name="android:widgetLayout">@android:layout/preference_dialog</item>
|
||||
</style>
|
||||
|
||||
<!-- Other Misc Styles -->
|
||||
|
||||
Reference in New Issue
Block a user