1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2024 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
17<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    android:layout_width="match_parent"
19    android:layout_height="match_parent"
20    android:theme="@style/Theme.SystemUI.Dialog"
21    xmlns:app="http://schemas.android.com/apk/res-auto">
22
23    <!-- Negative Button, reserved for app -->
24    <Button
25        android:id="@+id/button_negative"
26        style="@style/AuthCredentialNegativeButtonStyle"
27        android:layout_width="wrap_content"
28        android:layout_height="wrap_content"
29        android:layout_gravity="center_vertical"
30        android:layout_marginStart="24dp"
31        android:layout_marginBottom="8dp"
32        android:visibility="invisible"
33        app:layout_constrainedWidth="true"
34        app:layout_constraintBottom_toBottomOf="parent"
35        app:layout_constraintEnd_toEndOf="@id/button_center_guideline"
36        app:layout_constraintHorizontal_bias="0.0"
37        app:layout_constraintStart_toStartOf="parent" />
38
39    <!-- Cancel Button, replaces negative button when biometric is accepted -->
40    <Button
41        android:id="@+id/button_cancel"
42        style="@style/AuthCredentialNegativeButtonStyle"
43        android:layout_width="wrap_content"
44        android:layout_height="wrap_content"
45        android:layout_gravity="center_vertical"
46        android:layout_marginStart="24dp"
47        android:layout_marginBottom="8dp"
48        android:text="@string/cancel"
49        android:visibility="invisible"
50        app:layout_constrainedWidth="true"
51        app:layout_constraintBottom_toBottomOf="parent"
52        app:layout_constraintEnd_toEndOf="@id/button_center_guideline"
53        app:layout_constraintHorizontal_bias="0.0"
54        app:layout_constraintStart_toStartOf="parent" />
55
56    <!-- "Use Credential" Button, replaces if device credential is allowed -->
57    <Button
58        android:id="@+id/button_use_credential"
59        style="@style/AuthCredentialNegativeButtonStyle"
60        android:layout_width="wrap_content"
61        android:layout_height="wrap_content"
62        android:layout_gravity="center_vertical"
63        android:layout_marginStart="24dp"
64        android:layout_marginBottom="8dp"
65        android:visibility="invisible"
66        app:layout_constrainedWidth="true"
67        app:layout_constraintBottom_toBottomOf="parent"
68        app:layout_constraintEnd_toEndOf="@id/button_center_guideline"
69        app:layout_constraintHorizontal_bias="0.0"
70        app:layout_constraintStart_toStartOf="parent" />
71
72    <!-- Positive Button -->
73    <Button
74        android:id="@+id/button_confirm"
75        style="@style/Widget.Dialog.Button"
76        android:layout_width="wrap_content"
77        android:layout_height="wrap_content"
78        android:layout_gravity="center_vertical"
79        android:layout_marginEnd="24dp"
80        android:layout_marginBottom="8dp"
81        android:text="@string/biometric_dialog_confirm"
82        android:visibility="invisible"
83        app:layout_constrainedWidth="true"
84        app:layout_constraintBottom_toBottomOf="parent"
85        app:layout_constraintEnd_toEndOf="parent"
86        app:layout_constraintHorizontal_bias="1.0"
87        app:layout_constraintStart_toStartOf="@id/button_center_guideline" />
88
89    <!-- Try Again Button -->
90    <Button
91        android:id="@+id/button_try_again"
92        style="@style/Widget.Dialog.Button"
93        android:layout_width="wrap_content"
94        android:layout_height="wrap_content"
95        android:layout_gravity="center_vertical"
96        android:layout_marginEnd="24dp"
97        android:layout_marginBottom="8dp"
98        android:text="@string/biometric_dialog_try_again"
99        android:visibility="invisible"
100        app:layout_constrainedWidth="true"
101        app:layout_constraintBottom_toBottomOf="parent"
102        app:layout_constraintEnd_toEndOf="parent"
103        app:layout_constraintHorizontal_bias="1.0"
104        app:layout_constraintStart_toStartOf="@id/button_center_guideline" />
105
106    <androidx.constraintlayout.widget.Guideline
107        android:id="@+id/button_center_guideline"
108        android:layout_width="wrap_content"
109        android:layout_height="wrap_content"
110        android:orientation="vertical"
111        app:layout_constraintGuide_percent="0.5" />
112
113</androidx.constraintlayout.widget.ConstraintLayout>
114