OLD | NEW |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
3 | 3 |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <org.chromium.chrome.browser.signin.AccountSigninView | 7 <org.chromium.chrome.browser.signin.AccountSigninView |
newt (away)
2016/04/01 23:43:10
Since this layout is so long, it would be very hel
gogerald1
2016/04/12 01:21:11
Done.
| |
8 xmlns:android="http://schemas.android.com/apk/res/android" | 8 xmlns:android="http://schemas.android.com/apk/res/android" |
9 xmlns:chrome="http://schemas.android.com/apk/res-auto" | 9 xmlns:chrome="http://schemas.android.com/apk/res-auto" |
10 android:layout_width="match_parent" | 10 android:layout_width="match_parent" |
11 android:layout_height="match_parent"> | 11 android:layout_height="match_parent" |
12 | 12 android:background="@color/signin_body_background"> |
13 <ScrollView | 13 |
14 <LinearLayout | |
newt (away)
2016/04/01 23:43:10
Use a FrameLayout here (and remove android:orienta
gogerald1
2016/04/12 01:21:11
Done.
| |
14 android:layout_width="match_parent" | 15 android:layout_width="match_parent" |
15 android:layout_height="match_parent" | 16 android:layout_height="match_parent" |
16 android:layout_marginBottom="72dp" | 17 android:layout_marginBottom="52dp" |
17 android:fillViewport="true"> | 18 android:orientation="vertical"> |
18 | 19 |
19 <LinearLayout | 20 <LinearLayout |
20 android:id="@+id/fre_main_layout" | 21 android:id="@+id/signin" |
newt (away)
2016/04/01 23:43:10
maybe: "signin_choose_account_page"
gogerald1
2016/04/12 01:21:11
Done.
| |
21 android:layout_width="match_parent" | 22 android:layout_width="match_parent" |
22 android:layout_height="wrap_content" | 23 android:layout_height="wrap_content" |
newt (away)
2016/04/01 23:43:10
should be match_parent
gogerald1
2016/04/12 01:21:11
Done.
| |
23 android:orientation="vertical" | 24 android:orientation="vertical"> |
24 android:gravity="center_horizontal"> | |
25 | 25 |
26 <TextView | 26 <TextView |
27 android:id="@+id/title" | 27 android:id="@+id/signin_title" |
newt (away)
2016/04/01 23:43:10
it's worth noting that this TextView's height is s
gogerald1
2016/04/12 01:21:11
Done.
| |
28 android:text="@string/signin_set_up_chrome" | 28 android:layout_width="match_parent" |
29 style="@style/FreTitle"/> | 29 android:layout_height="wrap_content" |
30 | 30 android:layout_gravity="start" |
newt (away)
2016/04/01 23:43:11
not needed
gogerald1
2016/04/12 01:21:12
Done.
| |
31 <!-- The orientation of this view is changed dynamically to give a n icer layout when in | 31 android:gravity="bottom" |
newt (away)
2016/04/01 23:43:10
Not needed. Please avoid using gravity and layout_
gogerald1
2016/04/12 01:21:12
we need this one to put the text at the bottom of
| |
32 landscape mode on devices with small screens. --> | 32 android:paddingStart="16dp" |
33 android:paddingEnd="16dp" | |
34 android:paddingBottom="16dp" | |
35 android:background="@color/signin_head_background" | |
36 android:textColor="@color/default_text_color" | |
37 android:textSize="@dimen/fre_title_text_size" | |
38 android:text="@string/sign_in_to_chrome"/> | |
39 | |
40 <View | |
41 android:layout_width="match_parent" | |
42 android:layout_height="1dp" | |
43 android:background="@color/signin_border_line_color" | |
44 android:alpha="0.08"/> | |
45 | |
46 <org.chromium.chrome.browser.signin.AccountListView | |
47 android:id="@+id/signin_account_list" | |
48 android:layout_width="match_parent" | |
49 android:layout_height="wrap_content" | |
50 android:layout_gravity="start" | |
newt (away)
2016/04/01 23:43:10
not needed. layout_gravity="start" is the default.
gogerald1
2016/04/12 01:21:12
Done.
| |
51 android:paddingStart="16dp" | |
newt (away)
2016/04/01 23:43:11
Instead of putting paddingStart and End on the Lis
gogerald1
2016/04/12 01:21:11
Done.
| |
52 android:paddingEnd="16dp" | |
53 android:divider="@null" | |
54 android:dividerHeight="0dp" | |
55 android:scrollbars="none" | |
56 android:requiresFadingEdge="vertical" | |
57 android:fadingEdgeLength="48dp"/> | |
58 | |
59 <View | |
newt (away)
2016/04/01 23:43:11
This view isn't needed. (And if it were needed, th
gogerald1
2016/04/12 01:21:11
Done.
| |
60 android:layout_width="match_parent" | |
61 android:layout_height="0dp" | |
62 android:layout_weight="1" | |
63 android:visibility="invisible"/> | |
64 | |
65 </LinearLayout> | |
66 | |
67 <org.chromium.chrome.browser.signin.AccountSigninConfirmationView | |
68 android:id="@+id/signin_confirmation_layout" | |
69 android:layout_width="match_parent" | |
70 android:layout_height="wrap_content" | |
newt (away)
2016/04/01 23:43:10
should be match_parent
gogerald1
2016/04/12 01:21:11
Done.
| |
71 android:scrollbars="none" | |
72 android:requiresFadingEdge="vertical" | |
73 android:fadingEdgeLength="48dp" | |
74 android:visibility="gone"> | |
75 | |
33 <LinearLayout | 76 <LinearLayout |
newt (away)
2016/04/01 23:43:11
Use a RelativeLayout here, remove all the LinearLa
gogerald1
2016/04/12 01:21:12
Done.
| |
34 android:id="@+id/fre_image_and_content" | |
35 android:layout_width="match_parent" | 77 android:layout_width="match_parent" |
36 android:layout_height="wrap_content" | 78 android:layout_height="wrap_content" |
37 android:orientation="vertical" | 79 android:orientation="vertical"> |
38 android:gravity="center_horizontal" | |
39 android:layout_marginTop="@dimen/fre_vertical_spacing"> | |
40 | |
41 <org.chromium.chrome.browser.firstrun.ImageCarousel | |
42 android:id="@+id/image" | |
43 android:layout_width="@dimen/signin_image_carousel_width" | |
44 android:layout_height="@dimen/fre_image_height" /> | |
45 | 80 |
46 <LinearLayout | 81 <LinearLayout |
47 android:id="@+id/fre_content_wrapper" | 82 android:id="@+id/signin_confirmation_head" |
48 android:layout_width="0dp" | 83 android:layout_width="match_parent" |
49 android:layout_height="0dp" | 84 android:layout_height="wrap_content" |
50 android:layout_weight="1" | 85 android:paddingStart="16dp" |
51 android:layout_marginTop="@dimen/fre_vertical_spacing" | 86 android:paddingEnd="16dp" |
52 android:layout_marginEnd="@dimen/fre_content_margin" | 87 android:background="@color/signin_head_background" |
53 android:layout_marginStart="@dimen/fre_content_margin" | 88 android:orientation="vertical"> |
54 android:orientation="vertical" > | 89 |
55 | 90 <View |
56 <Spinner | 91 android:layout_width="match_parent" |
newt (away)
2016/04/01 23:43:10
Might as well be 0dp
gogerald1
2016/04/12 01:21:12
Done.
| |
57 style="@style/Widget.AppCompat.Spinner.Underlined" | 92 android:layout_height="0dp" |
58 android:id="@+id/google_accounts_spinner" | 93 android:layout_weight="1" |
newt (away)
2016/04/01 23:43:10
Setting layout_weight="1" here has no effect, sinc
gogerald1
2016/04/12 01:21:12
It's useful since we will set the aspect ratio of
| |
59 android:layout_width="wrap_content" | 94 android:visibility="invisible"/> |
60 android:layout_height="wrap_content" | 95 |
61 android:layout_marginBottom="@dimen/fre_vertical_spacing " | 96 <ImageView |
62 android:layout_gravity="center_horizontal" | 97 android:id="@+id/signin_account_image" |
63 android:popupBackground="#ffffff" | 98 android:layout_width="64dp" |
64 android:textColor="@color/fre_text_color" /> | 99 android:layout_height="64dp" |
100 android:layout_gravity="start|bottom" | |
newt (away)
2016/04/01 23:43:10
layout_gravity has no effect here
gogerald1
2016/04/12 01:21:11
Done.
| |
101 android:layout_marginBottom="24dp" | |
102 android:scaleType="fitXY" | |
newt (away)
2016/04/01 23:43:10
fitCenter is probably better than fitXY. fitXY wil
gogerald1
2016/04/12 01:21:11
Done.
| |
103 android:contentDescription="@null"/> | |
65 | 104 |
66 <TextView | 105 <TextView |
67 android:id="@+id/confirm_account_email" | 106 android:id="@+id/signin_account_name" |
68 android:layout_width="wrap_content" | 107 android:layout_width="match_parent" |
69 android:layout_height="wrap_content" | 108 android:layout_height="wrap_content" |
70 android:layout_gravity="center" | 109 android:layout_gravity="start|bottom" |
newt (away)
2016/04/01 23:43:11
again, layout_gravity isn't needed
gogerald1
2016/04/12 01:21:11
Done.
| |
110 android:layout_marginBottom="8dp" | |
111 android:textColor="@color/default_text_color" | |
112 android:textSize="@dimen/fre_title_text_size"/> | |
113 | |
114 <TextView | |
115 android:id="@+id/signin_account_email" | |
116 android:layout_width="match_parent" | |
117 android:layout_height="wrap_content" | |
118 android:layout_gravity="start|bottom" | |
newt (away)
2016/04/01 23:43:10
not needed
gogerald1
2016/04/12 01:21:11
Done.
| |
71 android:layout_marginBottom="16dp" | 119 android:layout_marginBottom="16dp" |
72 android:paddingTop="12dp" | 120 android:textColor="@color/descriptive_text_color" |
73 android:paddingBottom="8dp" | 121 android:textSize="@dimen/fre_normal_text_size"/> |
74 android:textColor="@color/fre_text_color" | 122 </LinearLayout> |
newt (away)
2016/04/01 23:43:11
There should be a divider line between the header
gogerald1
2016/04/12 01:21:11
Done.
| |
75 android:visibility="gone" /> | 123 |
76 | 124 <LinearLayout |
77 <org.chromium.ui.widget.TextViewWithClickableSpans | 125 android:id="@+id/signin_confirmation_content" |
78 android:id="@+id/description" | 126 android:layout_width="match_parent" |
79 android:layout_width="wrap_content" | 127 android:layout_height="wrap_content" |
80 android:layout_height="wrap_content" | 128 android:paddingStart="16dp" |
81 android:gravity="center" | 129 android:paddingEnd="16dp" |
82 android:lineSpacingMultiplier="1.4" | 130 android:orientation="vertical"> |
83 android:text="@string/signin_account_choice_description" | 131 |
84 android:textColor="@color/signin_light_text_color" | 132 <LinearLayout |
85 android:textSize="@dimen/fre_normal_text_size" /> | 133 android:id="@+id/signin_chrome_sync" |
newt (away)
2016/04/01 23:43:10
nit: remove unused IDs (such as this one). That ma
gogerald1
2016/04/12 01:21:12
Done.
| |
134 android:layout_width="match_parent" | |
135 android:layout_height="wrap_content" | |
136 android:layout_marginTop="16dp" | |
137 android:layout_marginBottom="16dp" | |
138 android:orientation="vertical"> | |
139 | |
140 <TextView | |
141 android:id="@+id/signin_chrome_sync_title" | |
142 android:layout_width="match_parent" | |
143 android:layout_height="wrap_content" | |
144 android:layout_marginBottom="8dp" | |
145 android:layout_gravity="start" | |
newt (away)
2016/04/01 23:43:11
layout_gravity and gravity aren't needed. Same for
gogerald1
2016/04/12 01:21:12
Done.
| |
146 android:gravity="start" | |
147 android:text="@string/signin_signed_in_description_t itle" | |
148 android:textColor="@color/default_text_color" | |
149 android:textSize="@dimen/fre_normal_text_size" | |
150 android:drawableStart="@drawable/chrome_sync_logo" | |
151 android:drawablePadding="16dp"/> | |
152 | |
153 <org.chromium.ui.widget.TextViewWithClickableSpans | |
154 android:id="@+id/signin_chrome_sync_description" | |
155 android:layout_width="match_parent" | |
156 android:layout_height="wrap_content" | |
157 android:layout_marginStart="32dp" | |
158 android:layout_gravity="start" | |
159 android:gravity="start" | |
160 android:lineSpacingMultiplier="1.4" | |
161 android:text="@string/signin_signed_in_description" | |
162 android:textColor="@color/descriptive_text_color" | |
163 android:textSize="@dimen/fre_normal_text_size" /> | |
86 </LinearLayout> | 164 </LinearLayout> |
87 | 165 |
166 <View | |
167 android:layout_width="match_parent" | |
168 android:layout_height="1dp" | |
169 android:layout_marginStart="32dp" | |
170 android:background="@color/signin_border_line_color" | |
171 android:alpha="0.08"/> | |
172 | |
173 <LinearLayout | |
174 android:id="@+id/signin_personalize_service" | |
175 android:layout_width="match_parent" | |
176 android:layout_height="wrap_content" | |
177 android:layout_marginTop="16dp" | |
178 android:orientation="vertical"> | |
179 | |
180 <TextView | |
181 android:id="@+id/signin_personalize_service_title" | |
182 android:layout_width="match_parent" | |
183 android:layout_height="wrap_content" | |
184 android:layout_marginBottom="8dp" | |
185 android:layout_gravity="start" | |
186 android:gravity="start" | |
187 android:text="@string/personalize_google_service" | |
188 android:textColor="@color/default_text_color" | |
189 android:textSize="@dimen/fre_normal_text_size" | |
190 android:drawableStart="@drawable/personalize_google_ service_logo" | |
191 android:drawablePadding="16dp"/> | |
192 | |
193 <TextView | |
194 android:id="@+id/signin_personalize_service_descript ion" | |
195 android:layout_width="match_parent" | |
196 android:layout_height="wrap_content" | |
197 android:layout_marginStart="32dp" | |
198 android:layout_marginBottom="16dp" | |
199 android:layout_gravity="start" | |
200 android:gravity="start" | |
201 android:lineSpacingMultiplier="1.4" | |
202 android:text="@string/signin_account_choice_descript ion" | |
203 android:textColor="@color/descriptive_text_color" | |
204 android:textSize="@dimen/fre_normal_text_size"/> | |
205 | |
206 <CheckBox | |
207 android:id="@+id/signin_personalize_service_checkbox " | |
208 android:layout_width="wrap_content" | |
209 android:layout_height="wrap_content" | |
210 android:layout_marginStart="27dp" | |
211 android:layout_gravity="start" | |
212 android:paddingStart="11dp" | |
213 android:gravity="start" | |
214 android:lineSpacingMultiplier="1.4" | |
215 android:text="@string/open_myaccount_after_sign_in" | |
216 android:textColor="@color/descriptive_text_color" | |
217 android:textSize="@dimen/fre_normal_text_size" /> | |
218 | |
219 <View | |
220 android:id="@+id/signin_confirmation_bottom_padding" | |
221 android:layout_width="match_parent" | |
newt (away)
2016/04/01 23:43:11
might as well be 0dp
gogerald1
2016/04/12 01:21:11
Done.
| |
222 android:layout_height="36dp" | |
223 android:visibility="invisible"/> | |
224 </LinearLayout> | |
225 </LinearLayout> | |
88 </LinearLayout> | 226 </LinearLayout> |
89 </LinearLayout> | 227 </org.chromium.chrome.browser.signin.AccountSigninConfirmationView> |
90 </ScrollView> | 228 </LinearLayout> |
91 | 229 |
92 <!-- layout_height = 72dp = fre_button_bar_height + paddingTop --> | 230 <!-- layout_height = 52dp --> |
newt (away)
2016/04/01 23:43:10
this comment in no longer useful; remove it
gogerald1
2016/04/12 01:21:12
Done.
| |
93 <LinearLayout | 231 <LinearLayout |
94 android:id="@+id/button_bar" | 232 android:id="@+id/button_bar" |
95 android:layout_width="match_parent" | 233 android:layout_width="match_parent" |
96 android:layout_height="72dp" | 234 android:layout_height="52dp" |
97 android:layout_gravity="bottom" | 235 android:layout_gravity="bottom" |
98 android:orientation="horizontal" | |
99 android:paddingTop="16dp" | |
100 android:paddingStart="16dp" | 236 android:paddingStart="16dp" |
101 android:paddingEnd="16dp" > | 237 android:paddingEnd="16dp" |
238 android:orientation="horizontal"> | |
102 | 239 |
103 <!--suppress ButtonStyle --> | 240 <!--suppress ButtonStyle --> |
104 <Button | 241 <Button |
105 android:id="@+id/negative_button" | 242 android:id="@+id/negative_button" |
106 style="@style/ButtonCompatBorderless" | 243 style="@style/ButtonCompatBorderless" |
107 android:layout_width="wrap_content" | 244 android:layout_width="wrap_content" |
108 android:layout_height="36dp" | 245 android:layout_height="36dp" |
109 android:text="@string/fre_skip_text" | 246 android:text="@string/fre_skip_text" |
110 android:textAllCaps="true" | 247 android:textAllCaps="true" |
111 android:textColor="@color/light_active_color" | 248 android:textColor="@color/light_active_color" |
112 android:textSize="14sp" | 249 android:textSize="14sp"/> |
113 android:layout_marginBottom="24dp" /> | |
114 | 250 |
115 <View | 251 <View |
116 android:layout_width="0dp" | 252 android:layout_width="0dp" |
117 android:layout_height="0dp" | 253 android:layout_height="0dp" |
118 android:layout_weight="1" | 254 android:layout_weight="1" |
119 android:visibility="invisible"/> | 255 android:visibility="invisible"/> |
120 | 256 |
121 <!--suppress ButtonStyle --> | 257 <!--suppress ButtonStyle --> |
122 <org.chromium.ui.widget.ButtonCompat | 258 <org.chromium.ui.widget.ButtonCompat |
123 android:id="@+id/positive_button" | 259 android:id="@+id/positive_button" |
124 android:layout_width="wrap_content" | 260 android:layout_width="wrap_content" |
125 android:layout_height="36dp" | 261 android:layout_height="36dp" |
126 android:text="@string/choose_account_sign_in" | 262 android:text="@string/choose_account_sign_in" |
127 android:textAllCaps="true" | 263 android:textAllCaps="true" |
128 android:textColor="@android:color/white" | 264 android:textColor="@android:color/white" |
129 android:textSize="14sp" | 265 android:textSize="14sp" |
130 chrome:buttonColor="@color/light_active_color" | 266 chrome:buttonColor="@color/light_active_color"/> |
131 android:layout_marginBottom="24dp" /> | |
132 | 267 |
133 <View | 268 <View |
134 android:id="@+id/positive_button_end_padding" | 269 android:id="@+id/positive_button_end_padding" |
135 android:layout_width="0dp" | 270 android:layout_width="0dp" |
136 android:layout_height="0dp" | 271 android:layout_height="0dp" |
137 android:layout_weight="1" | 272 android:layout_weight="1" |
138 android:visibility="gone"/> | 273 android:visibility="gone"/> |
139 </LinearLayout> | 274 </LinearLayout> |
140 | 275 |
141 </org.chromium.chrome.browser.signin.AccountSigninView> | 276 </org.chromium.chrome.browser.signin.AccountSigninView> |
OLD | NEW |