-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
website_approval_bottom_sheet.xml
154 lines (143 loc) · 6.82 KB
/
website_approval_bottom_sheet.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!-- This UI should not apply dynamic colors (it should only respect the
dark/light mode of the android device). This happens for UI consistency
reasons as this screen is displayed after a GMSCore bottom sheet which
doesn't support dynamic colors. -->
<LinearLayout
android:id="@+id/local_parent_approval_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:orientation="vertical"
android:paddingTop="24dp" >
<!-- TODO(crbug.com/1330900): check if it's really right to duplicate this from other
sheets? -->
<ImageView
android:id="@+id/googleg_icon"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_gravity="center_horizontal"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_logo_googleg_24dp"/>
<!-- The main text including website -->
<androidx.appcompat.widget.DialogTitle
android:id="@+id/website_approval_sheet_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="@dimen/website_approval_horizontal_margin"
android:layout_marginEnd="@dimen/website_approval_horizontal_margin"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingBottom="24dp"
android:text="@string/parent_website_approval_title"
android:textAlignment="center"
android:importantForAccessibility="yes"
android:screenReaderFocusable="true"
android:accessibilityTraversalBefore="@+id/website_details_container"
android:textAppearance="@style/TextAppearance.AlertDialogTitleStyle" />
<!-- The info box showing the website details -->
<org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow
android:id="@+id/website_details_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/website_approval_horizontal_margin"
android:layout_marginEnd="@dimen/website_approval_horizontal_margin"
android:backgroundTint="@color/default_bg_color_secondary"
style="@style/MaterialCardStyle">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="72dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:screenReaderFocusable="true"
android:importantForAccessibility="yes"
android:descendantFocusability="blocksDescendants">
<ImageView
android:id="@+id/favicon"
android:layout_width="@dimen/favicon_size_width"
android:layout_height="@dimen/favicon_size_width"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginTop="22dp"
android:layout_marginBottom="22dp"
android:importantForAccessibility="no"
android:layout_gravity="center"
app:srcCompat="@drawable/ic_family_link" />
<!-- Details of the domain that will be allowed, and full URL being displayed-->
<LinearLayout
android:id="@+id/url_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginTop="14dp"
android:layout_marginBottom="14dp"
android:layout_weight="1"
android:screenReaderFocusable="true"
android:orientation="vertical">
<TextView
android:id="@+id/all_pages_of"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="20dp"
android:ellipsize="end"
android:importantForAccessibility="yes"
android:focusable="false"
android:textAppearance="@style/TextAppearance.TextLarge.Primary" />
<view
android:id="@+id/full_url"
class="org.chromium.ui.ElidedUrlTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="20dp"
android:ellipsize="end"
android:importantForAccessibility="yes"
android:focusable="false"
android:textAppearance="@style/TextAppearance.TextMedium.Secondary" />
</LinearLayout>
</LinearLayout>
</org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow>
<!-- The approve button -->
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/approve_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/website_approval_horizontal_margin"
android:layout_marginEnd="@dimen/website_approval_horizontal_margin"
android:layout_marginTop="15dp"
android:layout_marginBottom="18dp"
android:minHeight="48dp"
android:gravity="center"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/parent_website_approval_approve_button"
app:buttonColor="@color/filled_button_bg"
app:buttonTextColor="@color/default_text_color_on_accent1_baseline_list"
style="@style/FilledButton.Flat"/>
<!-- The deny button button -->
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/deny_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/website_approval_horizontal_margin"
android:layout_marginEnd="@dimen/website_approval_horizontal_margin"
android:layout_marginTop="0dp"
android:layout_marginBottom="15dp"
android:minHeight="48dp"
android:gravity="center"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/parent_website_approval_deny_button"
app:buttonTextColor="@color/default_text_color_blue_baseline"
style="@style/TextButton"/>
</LinearLayout>