Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b6d8501 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Fix preference layouts so that custom preferences don't break."

parents 40e8dc17 b8e45b1f
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -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"
@@ -55,11 +59,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>
+7 −10
Original line number Diff line number Diff line
@@ -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>
+5 −48
Original line number Diff line number Diff line
@@ -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"
    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>
+6 −50
Original line number Diff line number Diff line
@@ -16,20 +16,6 @@

<!-- 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"
    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"
@@ -37,33 +23,3 @@
    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>
+5 −5
Original line number Diff line number Diff line
@@ -820,7 +820,7 @@
    </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">
@@ -829,7 +829,7 @@
    <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 -->