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