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

Commit b79eec9e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Align dropdown preference's dropdown with preference text"

parents 05c3333c 87e67b33
Loading
Loading
Loading
Loading
+5 −59
Original line number Diff line number Diff line
@@ -18,72 +18,18 @@

<!-- Based off frameworks/base/core/res/res/layout/preference_dropdown_material.xml
     except that icon space in this layout is always reserved -->
<LinearLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:gravity="center_vertical"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:background="?android:attr/selectableItemBackground"
    android:clipToPadding="false">
    android:layout_height="wrap_content">

    <Spinner
        android:id="@+id/spinner"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/preference_no_icon_padding_start"
        android:visibility="invisible" />

    <LinearLayout
        android:id="@+id/icon_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minWidth="60dp"
        android:gravity="start|center_vertical"
        android:orientation="horizontal"
        android:paddingEnd="12dp"
        android:paddingTop="4dp"
        android:paddingBottom="4dp">
        <android.support.v7.internal.widget.PreferenceImageView
            android:id="@android:id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxWidth="48dp"
            android:maxHeight="48dp" />
    </LinearLayout>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:paddingTop="16dp"
        android:paddingBottom="16dp">

        <TextView android:id="@android:id/title"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:singleLine="true"
                  android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead"
                  android:ellipsize="marquee" />

        <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="10" />

    </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="end|center_vertical"
                  android:paddingLeft="16dp"
                  android:orientation="vertical" />
    <include layout="@layout/preference_material_settings"/>

</LinearLayout>
 No newline at end of file
</FrameLayout>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -23,7 +23,8 @@
            class="com.android.settings.notification.RestrictedDropDownPreference$ReselectionSpinner"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="invisible" />
            android:visibility="invisible"
            android:layout_marginStart="@dimen/preference_no_icon_padding_start"/>

    <include layout="@layout/preference_material_settings" />