Camera: use relative grid layout for MultiView tests

Test: run MultiViewTest on pixel devices
Bug: 73951893
Change-Id: I39cde40ef98eac5aa02d6969603f133d6fca7715
diff --git a/tests/camera/res/layout/multi_view.xml b/tests/camera/res/layout/multi_view.xml
index e7c5508..4b156af 100644
--- a/tests/camera/res/layout/multi_view.xml
+++ b/tests/camera/res/layout/multi_view.xml
@@ -15,40 +15,66 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
+<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:columnCount="3">
 
+    <!-- Using relative width/height below.
+         Image might not have correct aspect ratio -->
+    <!-- Row 0 -->
     <TextureView
         android:id="@+id/texture_view_1"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
-
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
     <TextureView
         android:id="@+id/texture_view_2"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
     <TextureView
         android:id="@+id/texture_view_3"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
+
+    <!-- Row 1 -->
     <TextureView
         android:id="@+id/texture_view_4"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
     <TextureView
         android:id="@+id/texture_view_5"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
+    <!-- space filler -->
+    <Space
+        android:layout_columnSpan="1"
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
+
+    <!-- Row 2 -->
     <SurfaceView
         android:id="@+id/surface_view_1"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
 
     <SurfaceView
         android:id="@+id/surface_view_2"
-        android:layout_width="160dp"
-        android:layout_height="120dp"/>
-
-</LinearLayout>
+        android:layout_columnWeight="1"
+        android:layout_rowWeight="1"
+        android:layout_width="0dp"
+        android:layout_height="0dp"/>
+</GridLayout>