1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2019 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License") 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17 18<com.google.android.setupdesign.GlifLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:settings="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:icon="@drawable/ic_lock" 24 android:layout="@layout/sud_glif_blank_template" 25 settings:sucHeaderText="@string/lock_settings_picker_title"> 26 27 <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient 28 android:id="@+id/topLayout" 29 android:clipChildren="false" 30 android:clipToPadding="false" 31 android:orientation="horizontal" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent"> 34 35 <!-- left side: instructions and messages --> 36 <LinearLayout 37 android:layout_width="0dip" 38 android:layout_height="match_parent" 39 android:layout_weight="1.0" 40 android:layout_marginStart="?attr/sudMarginSides" 41 android:layout_marginBottom="@dimen/sud_content_frame_padding_bottom" 42 android:clipChildren="false" 43 android:clipToPadding="false" 44 android:orientation="vertical"> 45 46 <ImageView 47 android:id="@+id/sud_layout_icon" 48 style="@style/SudGlifIcon" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_gravity="?attr/sudGlifHeaderGravity" 52 android:layout_marginStart="0dp" 53 android:layout_marginEnd="0dp" 54 android:src="@drawable/ic_lock"/> 55 56 <ScrollView 57 android:id="@+id/scroll_layout_title_header" 58 android:layout_width="match_parent" 59 android:layout_height="0dp" 60 android:layout_weight="3.0"> 61 62 <LinearLayout 63 android:layout_width="match_parent" 64 android:layout_height="wrap_content" 65 android:orientation="vertical"> 66 67 <TextView 68 android:id="@+id/suc_layout_title" 69 style="@style/SudGlifHeaderTitle" 70 android:layout_width="match_parent" 71 android:layout_height="wrap_content" 72 android:layout_marginStart="0dp" 73 android:layout_marginEnd="0dp"/> 74 75 <TextView 76 android:id="@+id/message" 77 style="@style/SudDescription.Glif" 78 android:layout_width="match_parent" 79 android:layout_height="wrap_content" 80 android:minLines="2" /> 81 82 <!-- header message --> 83 <TextView 84 android:id="@+id/headerText" 85 android:layout_width="match_parent" 86 android:layout_height="wrap_content" 87 android:layout_marginTop="10dp" 88 android:gravity="?attr/sudGlifHeaderGravity" 89 android:textSize="18sp"/> 90 91 <Button 92 android:id="@+id/screen_lock_options" 93 style="@style/SudGlifButton.Tertiary" 94 android:layout_width="match_parent" 95 android:layout_height="wrap_content" 96 android:layout_marginTop="5dp" 97 android:gravity="?attr/sudGlifHeaderGravity" 98 android:text="@string/setup_lock_settings_options_button_label" 99 android:visibility="gone" /> 100 101 </LinearLayout> 102 103 </ScrollView> 104 105 <!-- footer can show a message, or confirm / restart buttons --> 106 <RelativeLayout 107 android:layout_width="match_parent" 108 android:layout_height="0dip" 109 android:layout_weight="1.0" 110 android:clipChildren="false" 111 android:clipToPadding="false"> 112 113 <!-- confirm / restart buttons --> 114 <LinearLayout android:id="@+id/buttonContainer" 115 android:layout_width="match_parent" 116 android:layout_height="wrap_content" 117 android:layout_centerHorizontal="true" 118 android:layout_alignParentBottom="true" 119 android:clipChildren="false" 120 android:clipToPadding="false" 121 android:orientation="horizontal"> 122 123 <!-- left : skip --> 124 <Button android:id="@+id/skip_button" 125 style="@style/SudGlifButton.Secondary" 126 android:layout_width="wrap_content" 127 android:layout_height="wrap_content" 128 android:text="@string/skip_label" 129 android:visibility="gone" /> 130 131 <!-- left / top button: skip, or re-try --> 132 <Button android:id="@+id/footerLeftButton" 133 style="@style/SetupWizardButton.Negative" 134 android:layout_width="wrap_content" 135 android:layout_height="wrap_content" 136 android:text="@string/lockpattern_restart_button_text" /> 137 138 <Space 139 android:layout_width="0dp" 140 android:layout_height="0dp" 141 android:layout_weight="1" /> 142 143 <!-- right / bottom button: confirm or ok --> 144 <Button android:id="@+id/footerRightButton" 145 style="@style/SetupWizardButton.Positive" 146 android:layout_width="wrap_content" 147 android:layout_height="wrap_content" 148 android:text="@string/lockpattern_confirm_button_text" /> 149 150 </LinearLayout> 151 152 <!-- message above buttons --> 153 <TextView android:id="@+id/footerText" 154 android:layout_width="wrap_content" 155 android:layout_height="wrap_content" 156 android:layout_above="@+id/buttonContainer" 157 android:layout_centerHorizontal="true" 158 android:layout_marginBottom="4dip" 159 android:textSize="14sp" 160 android:visibility="gone" /> 161 162 </RelativeLayout> 163 164 </LinearLayout> 165 166 <!-- right side: lock pattern --> 167 <com.google.android.setupdesign.view.FillContentLayout 168 style="@style/LockPatternContainerStyle" 169 android:layout_width="0dp" 170 android:layout_height="match_parent" 171 android:layout_weight="1.0" 172 android:paddingStart="0dp"> 173 174 <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" 175 android:layout_width="match_parent" 176 android:layout_height="match_parent" 177 android:layout_gravity="center" 178 android:background="@color/lock_pattern_background" /> 179 180 </com.google.android.setupdesign.view.FillContentLayout> 181 182 </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> 183 184</com.google.android.setupdesign.GlifLayout> 185