• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2018 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    android:id="@+id/layout"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent"
21    android:gravity="bottom"
22    android:background="@color/fingerprint_dialog_dim_color"
23    android:orientation="vertical">
24
25    <!-- This is not a Space since Spaces cannot be clicked -->
26    <View
27        android:id="@+id/space"
28        android:layout_width="match_parent"
29        android:layout_height="0dp"
30        android:layout_weight="1" />
31
32    <LinearLayout
33        android:layout_width="match_parent"
34        android:layout_height="wrap_content">
35
36        <!-- This is not a Space since Spaces cannot be clicked. The width of this changes depending
37         on horizontal/portrait orientation -->
38        <View
39            android:id="@+id/left_space"
40            android:layout_weight="1"
41            android:layout_width="0dp"
42            android:layout_height="match_parent"/>
43
44        <LinearLayout
45            android:id="@+id/dialog"
46            android:layout_width="0dp"
47            android:layout_height="wrap_content"
48            android:orientation="vertical"
49            android:elevation="2dp"
50            android:background="@drawable/fingerprint_dialog_bg">
51
52            <TextView
53                android:id="@+id/title"
54                android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
55                android:layout_width="match_parent"
56                android:layout_height="wrap_content"
57                android:layout_marginEnd="24dp"
58                android:layout_marginStart="24dp"
59                android:layout_marginTop="24dp"
60                android:gravity="@integer/fingerprint_dialog_text_gravity"
61                android:textSize="20sp"
62                android:maxLines="1"
63                android:singleLine="true"
64                android:ellipsize="marquee"
65                android:marqueeRepeatLimit="marquee_forever"
66                android:textColor="@color/fingerprint_dialog_text_dark_color"/>
67
68            <TextView
69                android:id="@+id/subtitle"
70                android:layout_width="match_parent"
71                android:layout_height="wrap_content"
72                android:layout_marginTop="8dp"
73                android:layout_marginStart="24dp"
74                android:layout_marginEnd="24dp"
75                android:gravity="@integer/fingerprint_dialog_text_gravity"
76                android:textSize="16sp"
77                android:maxLines="1"
78                android:singleLine="true"
79                android:ellipsize="marquee"
80                android:marqueeRepeatLimit="marquee_forever"
81                android:textColor="@color/fingerprint_dialog_text_dark_color"/>
82
83            <TextView
84                android:id="@+id/description"
85                android:layout_width="match_parent"
86                android:layout_height="wrap_content"
87                android:layout_marginEnd="24dp"
88                android:layout_marginStart="24dp"
89                android:gravity="@integer/fingerprint_dialog_text_gravity"
90                android:paddingTop="8dp"
91                android:textSize="16sp"
92                android:maxLines="4"
93                android:textColor="@color/fingerprint_dialog_text_dark_color"/>
94
95            <ImageView
96                android:id="@+id/fingerprint_icon"
97                android:layout_width="@dimen/fingerprint_dialog_fp_icon_size"
98                android:layout_height="@dimen/fingerprint_dialog_fp_icon_size"
99                android:layout_gravity="center_horizontal"
100                android:layout_marginTop="48dp"
101                android:scaleType="fitXY"
102                android:contentDescription="@string/accessibility_fingerprint_dialog_fingerprint_icon" />
103
104            <TextView
105                android:id="@+id/error"
106                android:layout_width="match_parent"
107                android:layout_height="wrap_content"
108                android:layout_marginEnd="24dp"
109                android:layout_marginStart="24dp"
110                android:paddingTop="16dp"
111                android:paddingBottom="24dp"
112                android:textSize="12sp"
113                android:gravity="center_horizontal"
114                android:accessibilityLiveRegion="polite"
115                android:text="@string/fingerprint_dialog_touch_sensor"
116                android:contentDescription="@string/accessibility_fingerprint_dialog_help_area"
117                android:textColor="@color/fingerprint_dialog_text_light_color"/>
118
119            <LinearLayout
120                android:layout_width="match_parent"
121                android:layout_height="72dip"
122                android:paddingTop="24dp"
123                android:layout_gravity="center_vertical"
124                style="?android:attr/buttonBarStyle"
125                android:orientation="horizontal"
126                android:measureWithLargestChild="true">
127                <Space android:id="@+id/leftSpacer"
128                    android:layout_width="24dp"
129                    android:layout_height="match_parent"
130                    android:visibility="visible" />
131                <!-- Negative Button -->
132                <Button android:id="@+id/button2"
133                    android:layout_width="wrap_content"
134                    android:layout_height="match_parent"
135                    style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
136                    android:layout_marginStart="-12dp"
137                    android:gravity="start|center_vertical"
138                    android:maxLines="2" />
139                <!-- Positive Button -->
140                <Button android:id="@+id/button1"
141                    android:layout_width="wrap_content"
142                    android:layout_height="match_parent"
143                    style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
144                    android:layout_marginEnd="12dp"
145                    android:maxLines="2" />
146                <Space android:id="@+id/rightSpacer"
147                    android:layout_width="24dip"
148                    android:layout_height="match_parent"
149                    android:visibility="gone" />
150            </LinearLayout>
151        </LinearLayout>
152
153        <!-- This is not a Space since Spaces cannot be clicked. The width of this changes depending
154         on horizontal/portrait orientation -->
155        <View
156            android:id="@+id/right_space"
157            android:layout_weight="1"
158            android:layout_width="0dp"
159            android:layout_height="match_parent" />
160
161    </LinearLayout>
162
163</LinearLayout>