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

Commit e0773a6a authored by Edgar Wang's avatar Edgar Wang
Browse files

Update widget layout of Preferences

- min width should be 48dp
- widget should not add paddingStart/End

Bug: 418025176
Test: atest & visual
Flag: EXEMPT resource update
Change-Id: Icfb8d94469a0da1f112dc3f8ce4d4d03003b1aec
parent 9d98487d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -34,8 +34,7 @@
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="end|center_vertical"
        android:paddingStart="@dimen/settingslib_expressive_space_small1"
        android:paddingEnd="0dp"
        android:minWidth="@dimen/settingslib_expressive_space_medium4"
        android:orientation="vertical"/>

</LinearLayout>
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@
    <include layout="@layout/settingslib_expressive_preference_icon_frame"/>

    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="@dimen/settingslib_expressive_space_none"
        android:layout_height="wrap_content"
        android:layout_weight="1"
@@ -80,7 +79,7 @@
        android:id="@android:id/widget_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:minWidth="@dimen/two_target_min_width"
        android:minWidth="@dimen/settingslib_expressive_space_medium4"
        android:gravity="center"
        android:orientation="vertical" />

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:background="?android:attr/selectableItemBackground"
    android:scaleType="centerInside"
    android:src="@drawable/ic_settings_accent"
    android:contentDescription="@string/settings_button" />
+8 −30
Original line number Diff line number Diff line
@@ -14,35 +14,13 @@
     limitations under the License.
-->

<!-- Settings button with optional ripple background through toggling visiblity. -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<!-- Settings button without ripple background. -->
<ImageView
        android:id="@+id/settings_button_no_background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:scaleType="center"
        android:src="@drawable/ic_settings_accent"
        android:contentDescription="@string/settings_button" />
    <!-- Additional overdraw background to stop parent's material ripple -->
    <FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/settings_button"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible"
        android:background="?android:attr/colorBackground">
        <ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
            android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
            android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
            android:background="?android:attr/selectableItemBackground"
    android:scaleType="center"
    android:src="@drawable/ic_settings_accent"
    android:contentDescription="@string/settings_button" />
    </FrameLayout>
</FrameLayout>
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
           android:id="@+id/button_icon"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:minWidth="@dimen/two_target_min_width"
           android:minWidth="@dimen/min_tap_target_size"
           android:minHeight="@dimen/min_tap_target_size"
           android:layout_gravity="center"
           android:background="?android:attr/selectableItemBackground"/>
Loading