Merge "Enable shrinking width on the IME Switcher menu" into main
diff --git a/core/res/res/layout/input_method_switch_dialog_new.xml b/core/res/res/layout/input_method_switch_dialog_new.xml
index 6bb969b..ab5d38f 100644
--- a/core/res/res/layout/input_method_switch_dialog_new.xml
+++ b/core/res/res/layout/input_method_switch_dialog_new.xml
@@ -21,21 +21,30 @@
     android:layout_height="wrap_content"
     android:orientation="vertical">
 
-    <com.android.internal.widget.MaxHeightFrameLayout
-        android:layout_width="320dp"
+    <LinearLayout
+        android:layout_width="wrap_content"
         android:layout_height="0dp"
         android:layout_weight="1"
-        android:maxHeight="373dp">
+        android:orientation="horizontal">
 
-        <com.android.internal.widget.RecyclerView
-            android:id="@+id/list"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingVertical="8dp"
-            android:clipToPadding="false"
-            android:layoutManager="com.android.internal.widget.LinearLayoutManager"/>
+        <!-- TODO(b/357644229): Enable shrinking width without three levels of nesting. -->
+        <com.android.internal.widget.MaxHeightFrameLayout
+            android:layout_width="320dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:maxHeight="373dp">
 
-    </com.android.internal.widget.MaxHeightFrameLayout>
+            <com.android.internal.widget.RecyclerView
+                android:id="@+id/list"
+                android:layout_width="match_parent"
+                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"