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 <!-- EditText views in FloatLabelLayout require both hint and contentDescription to be set | 6 <!-- EditText views in FloatLabelLayout require both hint and contentDescription to be set |
7 to work correctly for accessibility because FloatLabelLayout sometimes clea r hint. --> | 7 to work correctly for accessibility because FloatLabelLayout sometimes clea r hint. --> |
8 <!--suppress ContentDescription --> | 8 <!--suppress ContentDescription --> |
9 <merge | 9 <merge |
10 xmlns:android="http://schemas.android.com/apk/res/android" | 10 xmlns:android="http://schemas.android.com/apk/res/android" |
11 xmlns:app="http://schemas.android.com/apk/res-auto"> | 11 xmlns:app="http://schemas.android.com/apk/res-auto"> |
12 | 12 |
13 <!-- Name --> | |
13 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout | 14 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout |
14 android:id="@+id/credit_card_name_label" | 15 android:id="@+id/credit_card_name_label" |
15 android:layout_width="match_parent" | 16 android:layout_width="match_parent" |
16 android:layout_height="wrap_content"> | 17 android:layout_height="wrap_content" |
18 android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> | |
19 | |
17 <EditText | 20 <EditText |
18 android:id="@+id/credit_card_name_edit" | 21 android:id="@+id/credit_card_name_edit" |
19 android:layout_width="match_parent" | 22 android:layout_width="match_parent" |
20 android:layout_height="wrap_content" | 23 android:layout_height="wrap_content" |
21 android:imeOptions="flagNoExtractUi" | 24 android:imeOptions="flagNoExtractUi" |
22 android:inputType="textCapWords" | 25 android:inputType="textCapWords" |
23 android:hint="@string/autofill_credit_card_editor_name" /> | 26 android:hint="@string/autofill_credit_card_editor_name" /> |
27 | |
24 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> | 28 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> |
25 | 29 |
30 <!-- Credit card number --> | |
26 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout | 31 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout |
27 android:id="@+id/credit_card_number_label" | 32 android:id="@+id/credit_card_number_label" |
28 android:layout_width="match_parent" | 33 android:layout_width="match_parent" |
29 android:layout_height="wrap_content"> | 34 android:layout_height="wrap_content" |
35 android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> | |
36 | |
30 <EditText | 37 <EditText |
31 android:id="@+id/credit_card_number_edit" | 38 android:id="@+id/credit_card_number_edit" |
32 android:layout_width="match_parent" | 39 android:layout_width="match_parent" |
33 android:layout_height="wrap_content" | 40 android:layout_height="wrap_content" |
34 android:imeOptions="flagNoExtractUi" | 41 android:imeOptions="flagNoExtractUi" |
35 android:inputType="phone" | 42 android:inputType="phone" |
36 android:digits="0123456789- " | 43 android:digits="0123456789- " |
37 android:hint="@string/autofill_credit_card_editor_number" /> | 44 android:hint="@string/autofill_credit_card_editor_number" /> |
45 | |
38 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> | 46 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> |
39 | 47 |
48 <!-- Expiration date --> | |
40 <TextView | 49 <TextView |
41 android:id="@+id/credit_card_expiration_label" | 50 android:id="@+id/credit_card_expiration_label" |
42 android:layout_width="match_parent" | 51 android:layout_width="match_parent" |
43 android:layout_height="wrap_content" | 52 android:layout_height="wrap_content" |
44 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin g" | 53 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin g" |
45 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" | 54 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" |
46 android:focusable="true" | 55 android:focusable="true" |
47 android:textAppearance="@style/PreferenceFloatLabelTextAppearance" | 56 android:textAppearance="@style/PreferenceFloatLabelTextAppearance" |
48 android:text="@string/autofill_credit_card_editor_expiration_date" /> | 57 android:text="@string/autofill_credit_card_editor_expiration_date" /> |
49 | 58 |
50 <LinearLayout | 59 <LinearLayout |
51 android:id="@+id/credit_card_expiration_container" | 60 android:id="@+id/credit_card_expiration_container" |
52 android:layout_width="match_parent" | 61 android:layout_width="match_parent" |
53 android:layout_height="wrap_content" | 62 android:layout_height="wrap_content" |
63 android:layout_marginTop="@dimen/pref_autofill_field_top_margin" | |
64 android:layout_marginBottom="@dimen/pref_autofill_content_spacing" | |
54 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin g" | 65 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin g" |
55 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" | 66 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" |
56 android:orientation="horizontal" | 67 android:orientation="horizontal" |
57 android:paddingTop="8dp" | |
58 android:baselineAligned="false"> | 68 android:baselineAligned="false"> |
59 | 69 |
60 <LinearLayout | 70 <LinearLayout |
61 android:layout_width="0dp" | 71 android:layout_width="0dp" |
62 android:layout_height="wrap_content" | 72 android:layout_height="wrap_content" |
63 android:layout_weight="1" | 73 android:layout_weight="1" |
64 android:orientation="vertical" | 74 android:orientation="vertical" |
65 android:layout_marginEnd="@dimen/payments_section_large_spacing"> | 75 android:layout_marginEnd="@dimen/payments_section_large_spacing"> |
66 | 76 |
67 <android.support.v7.widget.AppCompatSpinner | 77 <android.support.v7.widget.AppCompatSpinner |
Ian Wen
2016/07/01 19:19:03
Correct me if I'm wrong. I thought the inflater we
gone
2016/07/01 23:00:49
It doesn't always work. Current guess is that we'
| |
68 android:id="@+id/autofill_credit_card_editor_month_spinner" | 78 android:id="@+id/autofill_credit_card_editor_month_spinner" |
69 android:layout_width="match_parent" | 79 android:layout_width="match_parent" |
70 android:layout_height="wrap_content" /> | 80 android:layout_height="wrap_content" |
81 android:focusable="true" /> | |
Ian Wen
2016/07/01 19:19:03
Don't we need to set focusableInTouchmode to be tr
gone
2016/07/01 23:00:49
Focus in these XML files seems fairly wonky; I've
| |
71 | 82 |
72 <View style="@style/PreferenceSpinnerUnderlineView" /> | 83 <View style="@style/PreferenceSpinnerUnderlineView" /> |
73 | 84 |
74 </LinearLayout> | 85 </LinearLayout> |
75 | 86 |
76 <LinearLayout | 87 <LinearLayout |
77 android:layout_width="0dp" | 88 android:layout_width="0dp" |
78 android:layout_height="wrap_content" | 89 android:layout_height="wrap_content" |
79 android:layout_weight="1" | 90 android:layout_weight="1" |
80 android:orientation="vertical"> | 91 android:orientation="vertical"> |
81 <android.support.v7.widget.AppCompatSpinner | 92 <android.support.v7.widget.AppCompatSpinner |
82 android:id="@+id/autofill_credit_card_editor_year_spinner" | 93 android:id="@+id/autofill_credit_card_editor_year_spinner" |
83 android:layout_width="match_parent" | 94 android:layout_width="match_parent" |
84 android:layout_height="wrap_content" /> | 95 android:layout_height="wrap_content" |
85 <View style="@style/PreferenceSpinnerUnderlineView" /> | 96 android:focusable="true" /> |
97 | |
98 <View style="@style/PreferenceSpinnerUnderlineView" /> | |
99 | |
86 </LinearLayout> | 100 </LinearLayout> |
87 </LinearLayout> | 101 </LinearLayout> |
88 | 102 |
89 <include layout="@layout/autofill_billing_address_dropdown" /> | 103 <include layout="@layout/autofill_billing_address_dropdown" /> |
90 </merge> | 104 </merge> |
OLD | NEW |