1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3 - License, v. 2.0. If a copy of the MPL was not distributed with this
4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
6 xmlns:app="http://schemas.android.com/apk/res-auto"
7 xmlns:tools="http://schemas.android.com/tools"
8 android:layout_width="match_parent"
9 android:layout_height="match_parent"
10 android:layout_margin="16dp">
13 android:layout_width="match_parent"
14 android:layout_height="wrap_content"
15 android:orientation="vertical">
19 android:id="@+id/card_number_title"
20 android:layout_width="wrap_content"
21 android:layout_height="16dp"
22 android:gravity="center_vertical"
23 android:letterSpacing="0.05"
24 android:paddingStart="3dp"
25 android:paddingEnd="0dp"
26 android:text="@string/credit_cards_card_number"
27 android:textColor="?attr/textPrimary"
28 android:textSize="12sp"
29 android:labelFor="@id/card_number_input"
30 app:fontFamily="@font/metropolis_semibold" />
32 <com.google.android.material.textfield.TextInputLayout
33 android:id="@+id/card_number_layout"
34 android:layout_width="match_parent"
35 android:layout_height="wrap_content"
36 android:textColor="?attr/textPrimary"
37 app:errorEnabled="true"
38 app:hintEnabled="false">
40 <com.google.android.material.textfield.TextInputEditText
41 android:id="@+id/card_number_input"
42 android:layout_width="match_parent"
43 android:layout_height="wrap_content"
44 android:digits="0123456789- "
45 android:ellipsize="end"
46 android:fontFamily="sans-serif"
47 android:imeOptions="flagNoExtractUi"
48 android:inputType="phone"
49 android:letterSpacing="0.01"
50 android:lineSpacingExtra="8sp"
52 android:singleLine="true"
53 android:textColor="?attr/textPrimary"
54 android:textSize="16sp" />
56 </com.google.android.material.textfield.TextInputLayout>
60 android:id="@+id/name_on_card_title"
61 android:layout_width="wrap_content"
62 android:layout_height="wrap_content"
63 android:layout_marginTop="10dp"
64 android:gravity="center_vertical"
65 android:letterSpacing="0.05"
66 android:paddingStart="3dp"
67 android:paddingEnd="0dp"
68 android:text="@string/credit_cards_name_on_card"
69 android:textColor="?attr/textPrimary"
70 android:textSize="12sp"
71 android:labelFor="@id/name_on_card_input"
72 app:fontFamily="@font/metropolis_semibold" />
74 <com.google.android.material.textfield.TextInputLayout
75 android:id="@+id/name_on_card_layout"
76 android:layout_width="match_parent"
77 android:layout_height="wrap_content"
78 android:paddingBottom="11dp"
79 android:textColor="?attr/textPrimary"
80 app:hintEnabled="false">
82 <com.google.android.material.textfield.TextInputEditText
83 android:id="@+id/name_on_card_input"
84 android:layout_width="match_parent"
85 android:layout_height="wrap_content"
86 android:ellipsize="end"
87 android:fontFamily="sans-serif"
88 android:imeOptions="flagNoExtractUi"
89 android:letterSpacing="0.01"
90 android:lineSpacingExtra="8sp"
92 android:singleLine="true"
93 android:textColor="?attr/textPrimary"
94 android:textSize="16sp" />
96 </com.google.android.material.textfield.TextInputLayout>
98 <!-- Expiration Date -->
100 android:id="@+id/expiration_date_title"
101 android:layout_width="wrap_content"
102 android:layout_height="wrap_content"
103 android:layout_marginTop="10dp"
104 android:gravity="center_vertical"
105 android:letterSpacing="0.05"
106 android:paddingStart="3dp"
107 android:paddingEnd="0dp"
108 android:text="@string/credit_cards_expiration_date"
109 android:textColor="?attr/textPrimary"
110 android:textSize="12sp"
111 app:fontFamily="@font/metropolis_semibold" />
114 android:layout_width="match_parent"
115 android:layout_height="wrap_content"
116 android:baselineAligned="false"
117 android:orientation="horizontal">
120 android:layout_width="0dp"
121 android:layout_height="wrap_content"
122 android:layout_marginEnd="24dp"
123 android:layout_weight="1"
124 android:orientation="vertical">
127 android:layout_width="0dp"
128 android:layout_height="0dp"
129 android:labelFor="@id/expiry_month_drop_down"
130 android:text="@string/credit_cards_expiration_date_month" />
132 <androidx.appcompat.widget.AppCompatSpinner
133 android:id="@+id/expiry_month_drop_down"
134 android:layout_width="match_parent"
135 android:layout_height="wrap_content"
136 tools:listitem="@android:layout/simple_list_item_1" />
139 android:layout_width="match_parent"
140 android:layout_height="1dp"
141 android:background="?attr/textPrimary" />
146 android:layout_width="0dp"
147 android:layout_height="wrap_content"
148 android:layout_weight="0.8"
149 android:orientation="vertical">
152 android:layout_width="0dp"
153 android:layout_height="0dp"
154 android:labelFor="@id/expiry_year_drop_down"
155 android:text="@string/credit_cards_expiration_date_year" />
157 <androidx.appcompat.widget.AppCompatSpinner
158 android:id="@+id/expiry_year_drop_down"
159 android:layout_width="match_parent"
160 android:layout_height="wrap_content"
161 tools:listitem="@android:layout/simple_list_item_1" />
164 android:layout_width="match_parent"
165 android:layout_height="1dp"
166 android:background="?attr/textPrimary" />
171 <androidx.constraintlayout.widget.ConstraintLayout
172 android:layout_width="match_parent"
173 android:layout_height="wrap_content"
174 android:paddingTop="16dp">
176 <com.google.android.material.button.MaterialButton
177 android:id="@+id/delete_button"
178 style="@style/Widget.MaterialComponents.Button.TextButton"
179 android:layout_width="wrap_content"
180 android:layout_height="0dp"
181 android:letterSpacing="0"
182 android:padding="10dp"
183 android:text="@string/credit_cards_delete_card_button"
184 android:textAllCaps="false"
185 android:textColor="@color/fx_mobile_text_color_warning"
186 android:visibility="gone"
187 app:fontFamily="@font/metropolis_semibold"
188 app:layout_constraintBottom_toBottomOf="parent"
189 app:layout_constraintStart_toStartOf="parent" />
191 <com.google.android.material.button.MaterialButton
192 android:id="@+id/cancel_button"
193 style="@style/Widget.MaterialComponents.Button.TextButton"
194 android:layout_width="wrap_content"
195 android:layout_height="0dp"
196 android:letterSpacing="0"
197 android:padding="10dp"
198 android:text="@string/credit_cards_cancel_button"
199 android:textAllCaps="false"
200 android:textColor="?attr/textPrimary"
201 android:textStyle="bold"
202 app:fontFamily="@font/metropolis_semibold"
203 app:layout_constraintBottom_toBottomOf="parent"
204 app:layout_constraintEnd_toStartOf="@id/save_button" />
206 <com.google.android.material.button.MaterialButton
207 android:id="@+id/save_button"
208 style="@style/NeutralButton"
209 android:layout_width="wrap_content"
210 android:paddingStart="12dp"
211 android:paddingEnd="12dp"
212 android:text="@string/credit_cards_save_button"
213 app:layout_constraintBottom_toBottomOf="parent"
214 app:layout_constraintEnd_toEndOf="parent" />
216 </androidx.constraintlayout.widget.ConstraintLayout>