1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2017 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<!-- NOTE: outer layout is required to provide proper shadow. -->
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:layout_width="fill_parent"
21    android:layout_height="wrap_content"
22    android:background="@drawable/autofill_bottomsheet_background"
23    android:orientation="vertical">
24
25    <com.android.server.autofill.ui.BottomSheetLayout
26        android:id="@+id/autofill_save"
27        android:layout_width="fill_parent"
28        android:layout_height="wrap_content"
29        android:layout_marginTop="@dimen/autofill_save_outer_margin"
30        android:background="?android:attr/colorSurface"
31        android:gravity="center_horizontal"
32        android:orientation="vertical">
33        <ScrollView
34            android:id="@+id/autofill_sheet_scroll_view"
35            android:layout_width="fill_parent"
36            android:layout_height="0dp"
37            android:fillViewport="true"
38            android:layout_weight="1">
39            <LinearLayout
40                android:layout_marginStart="@dimen/autofill_save_outer_margin"
41                android:layout_marginEnd="@dimen/autofill_save_outer_margin"
42                android:layout_width="fill_parent"
43                android:orientation="vertical"
44                android:layout_height="wrap_content"
45                >
46                <ImageView
47                    android:id="@+id/autofill_save_icon"
48                    android:scaleType="fitCenter"
49                    android:layout_gravity="center"
50                    android:layout_height="@dimen/autofill_save_icon_max_height"
51                    android:layout_width="fill_parent"/>
52
53                <TextView
54                    android:id="@+id/autofill_save_title"
55                    android:layout_width="fill_parent"
56                    android:layout_height="wrap_content"
57                    android:text="@string/autofill_save_title"
58                    android:layout_marginTop="16dp"
59                    android:paddingBottom="24dp"
60                    android:gravity="center"
61                    android:textAppearance="@style/AutofillSaveUiTitle">
62                </TextView>
63                <FrameLayout
64                    android:id="@+id/autofill_save_custom_subtitle"
65                    android:layout_width="match_parent"
66                    android:layout_height="wrap_content"
67                    android:minHeight="0dp"
68                    android:visibility="gone"/>
69                <View
70                    android:id="@+id/autofill_sheet_scroll_view_space"
71                    android:layout_width="match_parent"
72                    android:layout_height="16dp"/>
73            </LinearLayout>
74        </ScrollView>
75
76        <View
77            android:id="@+id/autofill_sheet_divider"
78            android:layout_width="match_parent"
79            android:layout_height="1dp"
80            style="@style/AutofillHalfSheetDivider" />
81
82      <com.android.server.autofill.ui.BottomSheetButtonBarLayout
83          android:id="@+id/autofill_save_button_bar"
84            android:layout_width="match_parent"
85            android:layout_height="wrap_content"
86            android:layout_gravity="end"
87            android:clipToPadding="false"
88            android:layout_marginTop="8dp"
89            android:layout_marginBottom="8dp"
90            android:theme="@style/Theme.DeviceDefault.AutofillHalfScreenDialogButton"
91            android:orientation="horizontal"
92            android:layout_marginStart="@dimen/autofill_save_outer_margin"
93            android:layout_marginEnd="@dimen/autofill_save_outer_margin"
94            >
95            <Button
96                android:id="@+id/autofill_save_no"
97                android:layout_width="wrap_content"
98                android:layout_height="40dp"
99                android:paddingStart="12dp"
100                android:paddingEnd="12dp"
101                android:paddingTop="0dp"
102                android:paddingBottom="0dp"
103                android:layout_marginTop="4dp"
104                android:layout_marginBottom="4dp"
105                android:minWidth="0dp"
106                style="?android:attr/borderlessButtonStyle"
107                android:text="@string/autofill_save_no">
108            </Button>
109
110            <Space
111                android:id="@+id/autofill_button_bar_spacer"
112                android:layout_width="0dp"
113                android:layout_height="0dp"
114                android:layout_weight="1"
115                android:visibility="invisible">
116            </Space>
117
118            <Button
119                android:id="@+id/autofill_save_yes"
120                android:layout_width="wrap_content"
121                android:layout_height="40dp"
122                android:layout_marginTop="4dp"
123                android:layout_marginBottom="4dp"
124                android:minWidth="0dp"
125                style="@style/AutofillHalfSheetTonalButton"
126                android:text="@string/autofill_save_yes">
127            </Button>
128
129        </com.android.server.autofill.ui.BottomSheetButtonBarLayout>
130
131    </com.android.server.autofill.ui.BottomSheetLayout>
132</LinearLayout>