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

Commit 7cc71599 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Enable shrinking width on the IME Switcher menu

Initially the new IME Switcher menu set a fixed width of 320dp. This
ensures the layout can shrink when the display size is smaller.

Flag: android.view.inputmethod.ime_switcher_revamp
Bug: 311791923
Test: adb shell wm size 320x480; adb shell wm density 120; observe
Change-Id: Icc1d6403d8368eba9ca4535eb6ca0062c59b32bc
parent ddc4d173
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -21,22 +21,31 @@
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">

        <!-- TODO(b/357644229): Enable shrinking width without three levels of nesting. -->
        <com.android.internal.widget.MaxHeightFrameLayout
            android:layout_width="320dp"
        android:layout_height="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:maxHeight="373dp">

            <com.android.internal.widget.RecyclerView
                android:id="@+id/list"
                android:layout_width="match_parent"
            android:layout_height="wrap_content"
                android:layout_height="match_parent"
                android:paddingVertical="8dp"
                android:clipToPadding="false"
                android:layoutManager="com.android.internal.widget.LinearLayoutManager"/>

        </com.android.internal.widget.MaxHeightFrameLayout>

    </LinearLayout>

    <LinearLayout
        style="?android:attr/buttonBarStyle"
        android:id="@+id/button_bar"