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 | |
7 to work correctly for accessibility because FloatLabelLayout sometimes clea
r hint. --> | |
8 <!--suppress ContentDescription --> | |
9 <merge | 6 <merge |
10 xmlns:android="http://schemas.android.com/apk/res/android" | 7 xmlns:android="http://schemas.android.com/apk/res/android" |
11 xmlns:app="http://schemas.android.com/apk/res-auto"> | 8 xmlns:app="http://schemas.android.com/apk/res-auto"> |
12 | 9 |
| 10 <!-- Name --> |
13 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout | 11 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout |
14 android:id="@+id/credit_card_name_label" | 12 android:id="@+id/credit_card_name_label" |
| 13 android:labelFor="@+id/credit_card_name_edit" |
15 android:layout_width="match_parent" | 14 android:layout_width="match_parent" |
16 android:layout_height="wrap_content"> | 15 android:layout_height="wrap_content" |
| 16 android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> |
| 17 |
17 <EditText | 18 <EditText |
18 android:id="@+id/credit_card_name_edit" | 19 android:id="@+id/credit_card_name_edit" |
19 android:layout_width="match_parent" | 20 android:layout_width="match_parent" |
20 android:layout_height="wrap_content" | 21 android:layout_height="wrap_content" |
21 android:imeOptions="flagNoExtractUi" | 22 android:imeOptions="flagNoExtractUi" |
22 android:inputType="textCapWords" | 23 android:inputType="textCapWords" |
23 android:hint="@string/autofill_credit_card_editor_name" /> | 24 android:hint="@string/autofill_credit_card_editor_name" /> |
| 25 |
24 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> | 26 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> |
25 | 27 |
| 28 <!-- Credit card number --> |
26 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout | 29 <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout |
27 android:id="@+id/credit_card_number_label" | 30 android:id="@+id/credit_card_number_label" |
| 31 android:labelFor="@+id/credit_card_number_edit" |
28 android:layout_width="match_parent" | 32 android:layout_width="match_parent" |
29 android:layout_height="wrap_content"> | 33 android:layout_height="wrap_content" |
| 34 android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> |
| 35 |
30 <EditText | 36 <EditText |
31 android:id="@+id/credit_card_number_edit" | 37 android:id="@+id/credit_card_number_edit" |
32 android:layout_width="match_parent" | 38 android:layout_width="match_parent" |
33 android:layout_height="wrap_content" | 39 android:layout_height="wrap_content" |
34 android:imeOptions="flagNoExtractUi" | 40 android:imeOptions="flagNoExtractUi" |
35 android:inputType="phone" | 41 android:inputType="phone" |
36 android:digits="0123456789- " | 42 android:digits="0123456789- " |
37 android:hint="@string/autofill_credit_card_editor_number" /> | 43 android:hint="@string/autofill_credit_card_editor_number" /> |
| 44 |
38 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> | 45 </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> |
39 | 46 |
| 47 <!-- Expiration date --> |
40 <TextView | 48 <TextView |
41 android:id="@+id/credit_card_expiration_label" | 49 android:id="@+id/credit_card_expiration_label" |
| 50 android:labelFor="@+id/credit_card_expiration_month" |
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" | |
47 android:textAppearance="@style/PreferenceFloatLabelTextAppearance" | 55 android:textAppearance="@style/PreferenceFloatLabelTextAppearance" |
48 android:text="@string/autofill_credit_card_editor_expiration_date" /> | 56 android:text="@string/autofill_credit_card_editor_expiration_date" /> |
49 | 57 |
50 <LinearLayout | 58 <LinearLayout |
51 android:id="@+id/credit_card_expiration_container" | 59 android:id="@+id/credit_card_expiration_container" |
52 android:layout_width="match_parent" | 60 android:layout_width="match_parent" |
53 android:layout_height="wrap_content" | 61 android:layout_height="wrap_content" |
| 62 android:layout_marginTop="@dimen/pref_autofill_field_top_margin" |
| 63 android:layout_marginBottom="@dimen/pref_autofill_content_spacing" |
54 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin
g" | 64 android:layout_marginStart="@dimen/pref_autofill_field_horizontal_paddin
g" |
55 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" | 65 android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" |
56 android:orientation="horizontal" | 66 android:orientation="horizontal" |
57 android:paddingTop="8dp" | |
58 android:baselineAligned="false"> | 67 android:baselineAligned="false"> |
59 | 68 |
60 <LinearLayout | 69 <LinearLayout |
| 70 android:id="@+id/credit_card_expiration_month" |
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:layout_marginEnd="@dimen/payments_section_large_spacing" |
65 android:layout_marginEnd="@dimen/payments_section_large_spacing"> | 75 android:orientation="vertical"> |
66 | 76 |
67 <android.support.v7.widget.AppCompatSpinner | 77 <android.support.v7.widget.AppCompatSpinner |
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" /> |
71 | 81 |
72 <View style="@style/PreferenceSpinnerUnderlineView" /> | 82 <View style="@style/PreferenceSpinnerUnderlineView" /> |
73 | 83 |
74 </LinearLayout> | 84 </LinearLayout> |
75 | 85 |
76 <LinearLayout | 86 <LinearLayout |
77 android:layout_width="0dp" | 87 android:layout_width="0dp" |
78 android:layout_height="wrap_content" | 88 android:layout_height="wrap_content" |
79 android:layout_weight="1" | 89 android:layout_weight="1" |
80 android:orientation="vertical"> | 90 android:orientation="vertical"> |
81 <android.support.v7.widget.AppCompatSpinner | 91 |
82 android:id="@+id/autofill_credit_card_editor_year_spinner" | 92 <android.support.v7.widget.AppCompatSpinner |
83 android:layout_width="match_parent" | 93 android:id="@+id/autofill_credit_card_editor_year_spinner" |
84 android:layout_height="wrap_content" /> | 94 android:layout_width="match_parent" |
85 <View style="@style/PreferenceSpinnerUnderlineView" /> | 95 android:layout_height="wrap_content" /> |
| 96 |
| 97 <View style="@style/PreferenceSpinnerUnderlineView" /> |
| 98 |
86 </LinearLayout> | 99 </LinearLayout> |
87 </LinearLayout> | 100 </LinearLayout> |
88 | 101 |
89 <include layout="@layout/autofill_billing_address_dropdown" /> | 102 <include layout="@layout/autofill_billing_address_dropdown" /> |
90 </merge> | 103 </merge> |
OLD | NEW |