1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright 2020 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 android:layout_width="match_parent" 18 android:layout_height="match_parent"> 19 20 <TextView 21 android:id="@+id/enable_buttons_desc" 22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:layout_marginLeft="30dp" 25 android:layout_marginRight="30dp" 26 android:layout_centerInParent="true" 27 android:textSize="20dp" 28 android:text="@string/display_cutout_test_instruction" /> 29 30 <include layout="@layout/pass_fail_buttons" 31 android:id="@+id/pass_fail_buttons" 32 android:layout_width="match_parent" 33 android:layout_height="wrap_content" 34 android:layout_marginLeft="30dp" 35 android:layout_marginRight="30dp" 36 android:layout_below="@id/enable_buttons_desc" /> 37 38 <LinearLayout 39 android:id="@+id/top_buttons" 40 android:layout_width="match_parent" 41 android:layout_height="@dimen/display_cutout_test_button_size" 42 android:layout_alignParentTop="true" 43 android:visibility="gone" 44 android:orientation="horizontal" > 45 <Button 46 android:layout_width="0dp" 47 android:layout_height="match_parent" 48 android:layout_weight="1" 49 android:text="0" 50 android:textSize="10dp" 51 android:onClick="onButtonClicked" 52 android:background="@drawable/display_cutout_test_button" /> 53 <Space 54 android:layout_width="0dp" 55 android:layout_height="match_parent" 56 android:layout_weight="1" /> 57 <Button 58 android:layout_width="0dp" 59 android:layout_height="match_parent" 60 android:layout_weight="1" 61 android:text="1" 62 android:textSize="10dp" 63 android:onClick="onButtonClicked" 64 android:background="@drawable/display_cutout_test_button" /> 65 <Space 66 android:layout_width="0dp" 67 android:layout_height="match_parent" 68 android:layout_weight="1" /> 69 <Button 70 android:layout_width="0dp" 71 android:layout_height="match_parent" 72 android:layout_weight="1" 73 android:text="2" 74 android:textSize="10dp" 75 android:onClick="onButtonClicked" 76 android:background="@drawable/display_cutout_test_button" /> 77 <Space 78 android:layout_width="0dp" 79 android:layout_height="match_parent" 80 android:layout_weight="1" /> 81 <Button 82 android:layout_width="0dp" 83 android:layout_height="match_parent" 84 android:layout_weight="1" 85 android:text="3" 86 android:textSize="10dp" 87 android:onClick="onButtonClicked" 88 android:background="@drawable/display_cutout_test_button" /> 89 </LinearLayout> 90 91 <LinearLayout 92 android:id="@+id/bottom_buttons" 93 android:layout_width="match_parent" 94 android:layout_height="@dimen/display_cutout_test_button_size" 95 android:layout_alignParentBottom="true" 96 android:visibility="gone" 97 android:orientation="horizontal" > 98 <Button 99 android:layout_width="0dp" 100 android:layout_height="match_parent" 101 android:layout_weight="1" 102 android:text="11" 103 android:textSize="10dp" 104 android:onClick="onButtonClicked" 105 android:background="@drawable/display_cutout_test_button" /> 106 <Space 107 android:layout_width="0dp" 108 android:layout_height="match_parent" 109 android:layout_weight="1" /> 110 <Button 111 android:layout_width="0dp" 112 android:layout_height="match_parent" 113 android:layout_weight="1" 114 android:text="10" 115 android:textSize="10dp" 116 android:onClick="onButtonClicked" 117 android:background="@drawable/display_cutout_test_button" /> 118 <Space 119 android:layout_width="0dp" 120 android:layout_height="match_parent" 121 android:layout_weight="1" /> 122 <Button 123 android:layout_width="0dp" 124 android:layout_height="match_parent" 125 android:layout_weight="1" 126 android:text="9" 127 android:textSize="10dp" 128 android:onClick="onButtonClicked" 129 android:background="@drawable/display_cutout_test_button" /> 130 <Space 131 android:layout_width="0dp" 132 android:layout_height="match_parent" 133 android:layout_weight="1" /> 134 <Button 135 android:layout_width="0dp" 136 android:layout_height="match_parent" 137 android:layout_weight="1" 138 android:text="8" 139 android:textSize="10dp" 140 android:onClick="onButtonClicked" 141 android:background="@drawable/display_cutout_test_button" /> 142 143 </LinearLayout> 144 145 <LinearLayout 146 android:id="@+id/left_buttons" 147 android:layout_width="@dimen/display_cutout_test_button_size" 148 android:layout_height="match_parent" 149 android:layout_marginTop="@dimen/display_cutout_test_button_size" 150 android:layout_marginBottom="@dimen/display_cutout_test_button_size" 151 android:layout_alignParentLeft="true" 152 android:visibility="gone" 153 android:orientation="vertical" > 154 <Button 155 android:layout_width="match_parent" 156 android:layout_height="0dp" 157 android:layout_weight="1" 158 android:text="15" 159 android:textSize="10dp" 160 android:onClick="onButtonClicked" 161 android:background="@drawable/display_cutout_test_button" /> 162 <Space 163 android:layout_width="match_parent" 164 android:layout_height="0dp" 165 android:layout_weight="1" /> 166 <Button 167 android:layout_width="match_parent" 168 android:layout_height="0dp" 169 android:layout_weight="1" 170 android:text="14" 171 android:textSize="10dp" 172 android:onClick="onButtonClicked" 173 android:background="@drawable/display_cutout_test_button" /> 174 <Space 175 android:layout_width="match_parent" 176 android:layout_height="0dp" 177 android:layout_weight="1" /> 178 <Button 179 android:layout_width="match_parent" 180 android:layout_height="0dp" 181 android:layout_weight="1" 182 android:text="13" 183 android:textSize="10dp" 184 android:onClick="onButtonClicked" 185 android:background="@drawable/display_cutout_test_button" /> 186 <Space 187 android:layout_width="match_parent" 188 android:layout_height="0dp" 189 android:layout_weight="1" /> 190 <Button 191 android:layout_width="match_parent" 192 android:layout_height="0dp" 193 android:layout_weight="1" 194 android:text="12" 195 android:textSize="10dp" 196 android:onClick="onButtonClicked" 197 android:background="@drawable/display_cutout_test_button" /> 198 </LinearLayout> 199 200 <LinearLayout 201 android:id="@+id/right_buttons" 202 android:layout_width="@dimen/display_cutout_test_button_size" 203 android:layout_height="match_parent" 204 android:layout_marginTop="@dimen/display_cutout_test_button_size" 205 android:layout_marginBottom="@dimen/display_cutout_test_button_size" 206 android:layout_alignParentRight="true" 207 android:visibility="gone" 208 android:orientation="vertical" > 209 <Button 210 android:layout_width="match_parent" 211 android:layout_height="0dp" 212 android:layout_weight="1" 213 android:text="4" 214 android:textSize="10dp" 215 android:onClick="onButtonClicked" 216 android:background="@drawable/display_cutout_test_button" /> 217 <Space 218 android:layout_width="match_parent" 219 android:layout_height="0dp" 220 android:layout_weight="1" /> 221 <Button 222 android:layout_width="match_parent" 223 android:layout_height="0dp" 224 android:layout_weight="1" 225 android:text="5" 226 android:textSize="10dp" 227 android:onClick="onButtonClicked" 228 android:background="@drawable/display_cutout_test_button" /> 229 <Space 230 android:layout_width="match_parent" 231 android:layout_height="0dp" 232 android:layout_weight="1" /> 233 <Button 234 android:layout_width="match_parent" 235 android:layout_height="0dp" 236 android:layout_weight="1" 237 android:text="6" 238 android:textSize="10dp" 239 android:onClick="onButtonClicked" 240 android:background="@drawable/display_cutout_test_button" /> 241 <Space 242 android:layout_width="match_parent" 243 android:layout_height="0dp" 244 android:layout_weight="1" /> 245 <Button 246 android:layout_width="match_parent" 247 android:layout_height="0dp" 248 android:layout_weight="1" 249 android:text="7" 250 android:textSize="10dp" 251 android:onClick="onButtonClicked" 252 android:background="@drawable/display_cutout_test_button" /> 253 </LinearLayout> 254 255</RelativeLayout> 256