OLD | NEW |
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!-- Copyright 2016 The Chromium Authors. All rights reserved. | 2 <!-- Copyright 2016 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. --> | 4 found in the LICENSE file. --> |
5 | 5 |
6 <!-- Payments fields dialog. | 6 <!-- PaymentRequestUI dialog |
7 TODO(dfalcantara): Figure out if it makes sense to recombine this and the P
aymentResult | 7 This file smushes together two different dialogs that are similar in a lot
of ways, |
8 dialog box once redlines stabilize. --> | 8 but have key differences. The Java code inflating this layout manages the
hiding |
9 <merge | 9 and adjustment of elements in the layout. |
| 10 |
| 11 Request dialog: Sits at the bottom of the screen like a Bottom Sheet. |
| 12 Result dialog: Floats in the middle of the screen with a drop shadow. |
| 13 --> |
| 14 <org.chromium.chrome.browser.widget.BoundedLinearLayout |
10 xmlns:android="http://schemas.android.com/apk/res/android" | 15 xmlns:android="http://schemas.android.com/apk/res/android" |
11 xmlns:chrome="http://schemas.android.com/apk/res-auto" > | 16 xmlns:chrome="http://schemas.android.com/apk/res-auto" |
| 17 android:orientation="vertical" |
| 18 android:gravity="center" |
| 19 chrome:maxWidth="@dimen/payments_ui_max_dialog_width" |
| 20 android:background="@android:color/white" > |
12 | 21 |
13 <org.chromium.chrome.browser.widget.BoundedLinearLayout | 22 <!-- Header containing information about the site. |
14 android:id="@+id/payment_request_layout" | 23 Request dialog: Displays an X in the top right corner, allowing the use
r to close it. |
15 android:orientation="vertical" | 24 Result dialog: Displays no X. Title goes all the way to the end. |
16 android:background="@android:color/white" | 25 --> |
| 26 <FrameLayout |
17 android:layout_height="wrap_content" | 27 android:layout_height="wrap_content" |
18 android:layout_width="match_parent" | 28 android:layout_width="match_parent" |
19 android:layout_gravity="bottom|center_horizontal" | 29 android:minHeight="64dp" > |
20 chrome:maxWidth="@dimen/payments_ui_max_dialog_width" > | |
21 | 30 |
22 <!-- Box header. --> | 31 <ImageView |
23 <FrameLayout | 32 android:id="@+id/icon_view" |
| 33 android:layout_height="24dp" |
| 34 android:layout_width="24dp" |
| 35 android:layout_marginStart="16dp" |
| 36 android:layout_marginEnd="16dp" |
| 37 android:layout_gravity="start|center_vertical" |
| 38 android:importantForAccessibility="no" |
| 39 android:scaleType="centerInside" /> |
| 40 |
| 41 <LinearLayout |
| 42 android:id="@+id/page_info" |
24 android:layout_height="wrap_content" | 43 android:layout_height="wrap_content" |
25 android:layout_width="match_parent" | 44 android:layout_width="wrap_content" |
26 android:minHeight="64dp" > | 45 android:layout_marginStart="56dp" |
| 46 android:layout_marginEnd="56dp" |
| 47 android:layout_marginBottom="@dimen/payments_section_vertical_spacin
g" |
| 48 android:layout_marginTop="@dimen/payments_section_vertical_spacing" |
| 49 android:layout_gravity="center_vertical" |
| 50 android:orientation="vertical"> |
27 | 51 |
28 <ImageView | 52 <TextView |
29 android:id="@+id/pageFavIcon" | 53 android:id="@+id/page_title" |
30 android:layout_height="24dp" | |
31 android:layout_width="24dp" | |
32 android:layout_marginStart="16dp" | |
33 android:layout_marginEnd="16dp" | |
34 android:layout_gravity="start|center_vertical" | |
35 android:importantForAccessibility="no" | |
36 android:scaleType="centerInside" /> | |
37 | |
38 <LinearLayout | |
39 android:layout_height="wrap_content" | 54 android:layout_height="wrap_content" |
40 android:layout_width="wrap_content" | 55 android:layout_width="wrap_content" |
41 android:layout_marginStart="56dp" | 56 android:ellipsize="end" |
42 android:layout_marginEnd="56dp" | 57 android:maxLines="1" |
43 android:layout_gravity="center_vertical" | 58 android:singleLine="true" |
44 android:orientation="vertical"> | 59 android:textColor="@color/default_text_color" |
| 60 android:textSize="16sp" |
| 61 android:textStyle="bold" /> |
45 | 62 |
46 <TextView | 63 <TextView |
47 android:id="@+id/pageTitle" | 64 android:id="@+id/hostname" |
48 android:layout_height="wrap_content" | 65 android:layout_height="wrap_content" |
49 android:layout_width="wrap_content" | 66 android:layout_width="wrap_content" |
50 android:ellipsize="end" | 67 android:ellipsize="start" |
51 android:maxLines="1" | 68 android:maxLines="1" |
52 android:singleLine="true" | 69 android:singleLine="true" |
53 android:textColor="@color/default_text_color" | 70 android:textColor="@color/descriptive_text_color" |
54 android:textSize="16sp" | 71 android:textSize="14sp" /> |
55 android:textStyle="bold" /> | 72 </LinearLayout> |
56 | 73 |
57 <TextView | 74 <ImageView |
58 android:id="@+id/hostname" | 75 android:id="@+id/close_button" |
59 android:layout_height="wrap_content" | 76 android:layout_gravity="end|center_vertical" |
60 android:layout_width="wrap_content" | 77 android:layout_height="56dp" |
61 android:ellipsize="start" | 78 android:layout_width="56dp" |
62 android:maxLines="1" | 79 android:src="@drawable/btn_close" |
63 android:singleLine="true" | 80 android:contentDescription="@string/close" |
64 android:textColor="@color/descriptive_text_color" | 81 android:background="?attr/selectableItemBackground" |
65 android:textSize="14sp" /> | 82 android:scaleType="center" /> |
| 83 </FrameLayout> |
66 | 84 |
67 </LinearLayout> | 85 <!-- Indeterminate spinny to show that things are processing. --> |
| 86 <ProgressBar |
| 87 android:id="@+id/waiting_progress" |
| 88 android:layout_width="48dp" |
| 89 android:layout_height="48dp" |
| 90 android:layout_gravity="center_horizontal" |
| 91 android:layout_marginTop="@dimen/payments_section_largest_spacing" |
| 92 android:layout_marginBottom="@dimen/payments_section_small_spacing" /> |
68 | 93 |
69 <ImageView | 94 <!-- Message displayed to the user. --> |
70 android:id="@+id/close_button" | 95 <TextView |
71 android:layout_gravity="end|center_vertical" | 96 android:id="@+id/message" |
72 android:layout_height="56dp" | 97 android:layout_width="wrap_content" |
73 android:layout_width="56dp" | 98 android:layout_height="wrap_content" |
74 android:src="@drawable/btn_close" | 99 android:layout_gravity="center_horizontal" |
75 android:contentDescription="@string/close" | 100 android:layout_marginTop="@dimen/payments_section_small_spacing" |
76 android:background="?attr/selectableItemBackground" | 101 android:layout_marginStart="@dimen/payments_section_large_spacing" |
77 android:scaleType="center" /> | 102 android:layout_marginEnd="@dimen/payments_section_large_spacing" |
78 </FrameLayout> | 103 android:layout_marginBottom="@dimen/payments_section_largest_spacing" |
| 104 android:gravity="center_horizontal" |
| 105 android:textColor="@color/descriptive_text_color" |
| 106 android:textSize="16sp" /> |
79 | 107 |
80 <!-- Indeterminate spinny to show that things are processing. --> | 108 <!-- Request dialog: Payment information. --> |
81 <ProgressBar | 109 <org.chromium.chrome.browser.payments.ui.FadingEdgeScrollView |
82 android:id="@+id/waiting_progress" | 110 android:id="@+id/option_container" |
83 android:layout_width="48dp" | 111 android:layout_height="0dp" |
84 android:layout_height="48dp" | 112 android:layout_width="match_parent" |
85 android:layout_gravity="center_horizontal" | 113 android:layout_weight="1" |
86 android:layout_marginTop="@dimen/payments_section_largest_spacing" | 114 android:visibility="gone" > |
87 android:layout_marginBottom="@dimen/payments_section_small_spacing"
/> | |
88 | 115 |
89 <!-- Message indicating that we're still waiting on payment information.
--> | 116 <LinearLayout |
90 <TextView | 117 android:id="@+id/payment_container_layout" |
91 android:id="@+id/waiting_message" | 118 android:layout_width="match_parent" |
92 android:layout_width="wrap_content" | |
93 android:layout_height="wrap_content" | 119 android:layout_height="wrap_content" |
94 android:layout_gravity="center_horizontal" | 120 android:orientation="vertical" /> |
95 android:layout_marginTop="@dimen/payments_section_small_spacing" | |
96 android:layout_marginStart="@dimen/payments_section_large_spacing" | |
97 android:layout_marginEnd="@dimen/payments_section_large_spacing" | |
98 android:layout_marginBottom="@dimen/payments_section_largest_spacing
" | |
99 android:text="@string/payments_loading_message" | |
100 android:textColor="@color/descriptive_text_color" | |
101 android:textSize="16sp" /> | |
102 | 121 |
103 <!-- Payment information. --> | 122 </org.chromium.chrome.browser.payments.ui.FadingEdgeScrollView> |
104 <org.chromium.chrome.browser.payments.ui.FadingEdgeScrollView | |
105 android:id="@+id/paymentContainer" | |
106 android:layout_height="0dp" | |
107 android:layout_width="match_parent" | |
108 android:layout_weight="1" | |
109 android:fadingEdgeLength="9dp" | |
110 android:visibility="gone" > | |
111 | 123 |
112 <LinearLayout | 124 <!-- Request dialog: Edit/Cancel and Pay buttons. --> |
113 android:id="@+id/paymentContainerLayout" | 125 <org.chromium.chrome.browser.widget.DualControlLayout |
114 android:layout_width="match_parent" | 126 android:id="@+id/button_bar" |
115 android:layout_height="wrap_content" | 127 android:layout_height="wrap_content" |
116 android:orientation="vertical" /> | 128 android:layout_width="match_parent" |
| 129 android:padding="@dimen/payments_section_large_spacing" |
| 130 android:background="@android:color/white" |
| 131 android:visibility="gone" /> |
117 | 132 |
118 </org.chromium.chrome.browser.payments.ui.FadingEdgeScrollView> | 133 <!-- Result dialog: Dismisses the dialog. --> |
119 | 134 <Button |
120 <!-- Edit/Cancel and Pay buttons. --> | 135 android:id="@+id/ok_button" |
121 <org.chromium.chrome.browser.widget.DualControlLayout | 136 android:background="?android:attr/selectableItemBackground" |
122 android:id="@+id/buttonBar" | 137 android:text="@string/ok" |
123 android:layout_height="wrap_content" | 138 android:layout_width="wrap_content" |
124 android:layout_width="match_parent" | 139 android:layout_height="wrap_content" |
125 android:padding="@dimen/payments_section_large_spacing" | 140 android:layout_gravity="end" |
126 android:background="@android:color/white" | 141 android:layout_marginEnd="@dimen/payments_section_small_spacing" |
127 android:visibility="gone" /> | 142 android:layout_marginBottom="@dimen/payments_section_small_spacing" |
128 | 143 android:textColor="@color/light_active_color" |
129 </org.chromium.chrome.browser.widget.BoundedLinearLayout> | 144 android:visibility="gone" /> |
130 </merge> | 145 </org.chromium.chrome.browser.widget.BoundedLinearLayout> |
OLD | NEW |