1 <?xml version="1.0" encoding="utf-8"?>
3 Copyright (C) 2015 The Android Open Source Project
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
9 http://www.apache.org/licenses/LICENSE-2.0
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.
18 <com.android.setupwizardlib.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/suw_glif_blank_template"
25 settings:suwHeaderText="@string/lock_settings_picker_title">
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">
35 <!-- left side: instructions and messages -->
37 android:layout_width="0dip"
38 android:layout_height="match_parent"
39 android:layout_weight="1.0"
40 android:layout_marginStart="?attr/suwMarginSides"
41 android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom"
42 android:orientation="vertical">
45 android:layout_width="match_parent"
46 android:layout_height="wrap_content"
47 android:orientation="vertical">
50 android:id="@+id/suw_layout_icon"
51 style="@style/SuwGlifIcon"
52 android:layout_width="wrap_content"
53 android:layout_height="wrap_content"
54 android:layout_marginStart="0dp"
55 android:layout_marginEnd="0dp"
56 android:src="@drawable/ic_lock" />
59 android:id="@+id/suw_layout_title"
60 style="@style/SuwGlifHeaderTitle"
61 android:layout_width="match_parent"
62 android:layout_height="wrap_content"
63 android:layout_marginStart="0dp"
64 android:layout_marginEnd="0dp" />
68 <!-- header message -->
69 <TextView android:id="@+id/headerText"
70 android:layout_width="match_parent"
71 android:layout_height="wrap_content"
72 android:layout_marginTop="16dp"
73 android:gravity="start|bottom"
74 android:textSize="18sp" />
76 <!-- footer can show a message, or confirm / restart buttons -->
78 android:layout_width="match_parent"
79 android:layout_height="0dip"
80 android:layout_weight="1.0">
82 <!-- confirm / restart buttons -->
83 <LinearLayout android:id="@+id/buttonContainer"
84 android:layout_width="match_parent"
85 android:layout_height="wrap_content"
86 android:layout_centerHorizontal="true"
87 android:layout_alignParentBottom="true"
88 android:orientation="horizontal">
90 <!-- left / top button: skip, or re-try -->
91 <Button android:id="@+id/footerLeftButton"
92 style="@style/SetupWizardButton.Negative"
93 android:layout_width="wrap_content"
94 android:layout_height="wrap_content"
95 android:text="@string/lockpattern_restart_button_text" />
98 android:layout_width="0dp"
99 android:layout_height="0dp"
100 android:layout_weight="1" />
102 <!-- right / bottom button: confirm or ok -->
103 <Button android:id="@+id/footerRightButton"
104 style="@style/SetupWizardButton.Positive"
105 android:layout_width="wrap_content"
106 android:layout_height="wrap_content"
107 android:text="@string/lockpattern_confirm_button_text" />
111 <!-- message above buttons -->
112 <TextView android:id="@+id/footerText"
113 android:layout_width="wrap_content"
114 android:layout_height="wrap_content"
115 android:layout_above="@+id/buttonContainer"
116 android:layout_centerHorizontal="true"
117 android:layout_marginBottom="4dip"
118 android:textSize="14sp"
119 android:visibility="gone" />
125 <!-- right side: lock pattern -->
127 android:layout_width="0dp"
128 android:layout_height="match_parent"
129 android:layout_weight="1.0">
131 <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
132 android:layout_width="match_parent"
133 android:layout_height="match_parent"
134 android:layout_gravity="center"
135 android:background="@color/lock_pattern_background" />
139 </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
141 </com.android.setupwizardlib.GlifLayout>