[fenix] For https://github.com/mozilla-mobile/fenix/issues/22692: Remove Metropolis...
[gecko.git] / mobile / android / fenix / app / src / main / res / layout / fragment_address_editor.xml
bloba77d8cbf547b6aa59063fc5a11f0f6d5e7eacbe0
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 <androidx.core.widget.NestedScrollView
6     xmlns:android="http://schemas.android.com/apk/res/android"
7     xmlns:app="http://schemas.android.com/apk/res-auto"
8     android:layout_width="match_parent"
9     android:layout_height="match_parent"
10     android:fillViewport="true">
12     <androidx.constraintlayout.widget.ConstraintLayout
13         android:layout_width="match_parent"
14         android:layout_height="wrap_content"
15         android:layout_margin="16dp">
17         <!-- First Name -->
18         <TextView
19             android:id="@+id/first_name_title"
20             style="@style/CaptionTextStyle"
21             android:layout_width="wrap_content"
22             android:layout_height="16dp"
23             android:gravity="center_vertical"
24             android:labelFor="@id/first_name_input"
25             android:letterSpacing="0.05"
26             android:paddingStart="3dp"
27             android:paddingEnd="0dp"
28             android:text="@string/addresses_first_name"
29             android:textColor="?attr/textPrimary"
30             app:layout_constraintStart_toStartOf="parent"
31             app:layout_constraintTop_toTopOf="parent" />
33         <com.google.android.material.textfield.TextInputLayout
34             android:id="@+id/first_name_layout"
35             android:layout_width="match_parent"
36             android:layout_height="wrap_content"
37             android:textColor="?attr/textPrimary"
38             app:errorEnabled="true"
39             app:hintEnabled="false"
40             app:layout_constraintEnd_toEndOf="parent"
41             app:layout_constraintStart_toStartOf="parent"
42             app:layout_constraintTop_toBottomOf="@+id/first_name_title">
44             <com.google.android.material.textfield.TextInputEditText
45                 android:id="@+id/first_name_input"
46                 android:layout_width="match_parent"
47                 android:layout_height="wrap_content"
48                 android:ellipsize="end"
49                 android:fontFamily="sans-serif"
50                 android:imeOptions="flagNoExtractUi"
51                 android:letterSpacing="0.01"
52                 android:lineSpacingExtra="8sp"
53                 android:maxLines="1"
54                 android:singleLine="true"
55                 android:textColor="?attr/textPrimary"
56                 android:textSize="16sp" />
58         </com.google.android.material.textfield.TextInputLayout>
60         <!-- Middle Name -->
61         <TextView
62             android:id="@+id/middle_name_title"
63             style="@style/CaptionTextStyle"
64             android:layout_width="wrap_content"
65             android:layout_height="16dp"
66             android:gravity="center_vertical"
67             android:labelFor="@id/middle_name_input"
68             android:letterSpacing="0.05"
69             android:paddingStart="3dp"
70             android:paddingEnd="0dp"
71             android:text="@string/addresses_middle_name"
72             android:textColor="?attr/textPrimary"
73             app:layout_constraintStart_toStartOf="parent"
74             app:layout_constraintTop_toBottomOf="@id/first_name_layout" />
76         <com.google.android.material.textfield.TextInputLayout
77             android:id="@+id/middle_name_layout"
78             android:layout_width="match_parent"
79             android:layout_height="wrap_content"
80             android:textColor="?attr/textPrimary"
81             app:errorEnabled="true"
82             app:hintEnabled="false"
83             app:layout_constraintEnd_toEndOf="parent"
84             app:layout_constraintStart_toStartOf="parent"
85             app:layout_constraintTop_toBottomOf="@+id/middle_name_title">
87             <com.google.android.material.textfield.TextInputEditText
88                 android:id="@+id/middle_name_input"
89                 android:layout_width="match_parent"
90                 android:layout_height="wrap_content"
91                 android:ellipsize="end"
92                 android:fontFamily="sans-serif"
93                 android:imeOptions="flagNoExtractUi"
94                 android:letterSpacing="0.01"
95                 android:lineSpacingExtra="8sp"
96                 android:maxLines="1"
97                 android:singleLine="true"
98                 android:textColor="?attr/textPrimary"
99                 android:textSize="16sp" />
101         </com.google.android.material.textfield.TextInputLayout>
103         <!-- Last Name -->
104         <TextView
105             android:id="@+id/last_name_title"
106             style="@style/CaptionTextStyle"
107             android:layout_width="wrap_content"
108             android:layout_height="16dp"
109             android:gravity="center_vertical"
110             android:labelFor="@id/last_name_input"
111             android:letterSpacing="0.05"
112             android:paddingStart="3dp"
113             android:paddingEnd="0dp"
114             android:text="@string/addresses_last_name"
115             android:textColor="?attr/textPrimary"
116             app:layout_constraintStart_toStartOf="parent"
117             app:layout_constraintTop_toBottomOf="@id/middle_name_layout" />
119         <com.google.android.material.textfield.TextInputLayout
120             android:id="@+id/last_name_layout"
121             android:layout_width="match_parent"
122             android:layout_height="wrap_content"
123             android:textColor="?attr/textPrimary"
124             app:errorEnabled="true"
125             app:hintEnabled="false"
126             app:layout_constraintEnd_toEndOf="parent"
127             app:layout_constraintStart_toStartOf="parent"
128             app:layout_constraintTop_toBottomOf="@+id/last_name_title">
130             <com.google.android.material.textfield.TextInputEditText
131                 android:id="@+id/last_name_input"
132                 android:layout_width="match_parent"
133                 android:layout_height="wrap_content"
134                 android:ellipsize="end"
135                 android:fontFamily="sans-serif"
136                 android:imeOptions="flagNoExtractUi"
137                 android:letterSpacing="0.01"
138                 android:lineSpacingExtra="8sp"
139                 android:maxLines="1"
140                 android:singleLine="true"
141                 android:textColor="?attr/textPrimary"
142                 android:textSize="16sp" />
144         </com.google.android.material.textfield.TextInputLayout>
146         <!-- Street Address -->
147         <TextView
148             android:id="@+id/street_address_title"
149             style="@style/CaptionTextStyle"
150             android:layout_width="wrap_content"
151             android:layout_height="wrap_content"
152             android:layout_marginTop="10dp"
153             android:gravity="center_vertical"
154             android:letterSpacing="0.05"
155             android:paddingStart="3dp"
156             android:paddingEnd="0dp"
157             android:text="@string/addresses_street_address"
158             android:textColor="?attr/textPrimary"
159             android:labelFor="@id/street_address_input"
160             app:layout_constraintStart_toStartOf="parent"
161             app:layout_constraintTop_toBottomOf="@+id/last_name_layout" />
163         <com.google.android.material.textfield.TextInputLayout
164             android:id="@+id/street_address_layout"
165             android:layout_width="match_parent"
166             android:layout_height="wrap_content"
167             android:textColor="?attr/textPrimary"
168             app:hintEnabled="false"
169             app:layout_constraintEnd_toEndOf="parent"
170             app:layout_constraintStart_toStartOf="parent"
171             app:layout_constraintTop_toBottomOf="@+id/street_address_title">
173             <com.google.android.material.textfield.TextInputEditText
174                 android:id="@+id/street_address_input"
175                 android:layout_width="match_parent"
176                 android:layout_height="wrap_content"
177                 android:ellipsize="end"
178                 android:fontFamily="sans-serif"
179                 android:imeOptions="flagNoExtractUi"
180                 android:letterSpacing="0.01"
181                 android:lineSpacingExtra="8sp"
182                 android:maxLines="1"
183                 android:singleLine="true"
184                 android:textColor="?attr/textPrimary"
185                 android:textSize="16sp" />
187         </com.google.android.material.textfield.TextInputLayout>
189         <!-- City -->
190         <TextView
191             android:id="@+id/city_title"
192             style="@style/CaptionTextStyle"
193             android:layout_width="wrap_content"
194             android:layout_height="wrap_content"
195             android:layout_marginTop="10dp"
196             android:gravity="center_vertical"
197             android:letterSpacing="0.05"
198             android:paddingStart="3dp"
199             android:paddingEnd="0dp"
200             android:text="@string/addresses_city"
201             android:textColor="?attr/textPrimary"
202             android:labelFor="@id/city_input"
203             app:layout_constraintStart_toStartOf="parent"
204             app:layout_constraintTop_toBottomOf="@+id/street_address_layout" />
206         <com.google.android.material.textfield.TextInputLayout
207             android:id="@+id/city_layout"
208             android:layout_width="match_parent"
209             android:layout_height="wrap_content"
210             android:textColor="?attr/textPrimary"
211             app:hintEnabled="false"
212             app:layout_constraintEnd_toEndOf="parent"
213             app:layout_constraintStart_toStartOf="parent"
214             app:layout_constraintTop_toBottomOf="@+id/city_title">
216             <com.google.android.material.textfield.TextInputEditText
217                 android:id="@+id/city_input"
218                 android:layout_width="match_parent"
219                 android:layout_height="wrap_content"
220                 android:ellipsize="end"
221                 android:fontFamily="sans-serif"
222                 android:imeOptions="flagNoExtractUi"
223                 android:letterSpacing="0.01"
224                 android:lineSpacingExtra="8sp"
225                 android:maxLines="1"
226                 android:singleLine="true"
227                 android:textColor="?attr/textPrimary"
228                 android:textSize="16sp" />
230         </com.google.android.material.textfield.TextInputLayout>
232         <!-- Subregion -->
233         <LinearLayout
234             android:id="@+id/subregion_layout"
235             android:layout_width="match_parent"
236             android:layout_height="wrap_content"
237             android:paddingStart="3dp"
238             android:paddingEnd="3dp"
239             android:orientation="vertical"
240             app:layout_constraintStart_toStartOf="parent"
241             app:layout_constraintTop_toBottomOf="@id/city_layout"
242             app:layout_constraintBottom_toTopOf="@id/zip_title">
244             <TextView
245                 android:id="@+id/subregion_title"
246                 style="@style/CaptionTextStyle"
247                 android:layout_width="wrap_content"
248                 android:layout_height="wrap_content"
249                 android:layout_marginTop="10dp"
250                 android:textColor="?attr/textPrimary"
251                 android:labelFor="@id/subregion_drop_down"
252                 android:letterSpacing="0.05"
253                 android:text="@string/addresses_state" />
255             <androidx.appcompat.widget.AppCompatSpinner
256                 android:id="@+id/subregion_drop_down"
257                 android:layout_width="match_parent"
258                 android:layout_height="wrap_content" />
260             <View
261                 android:layout_width="match_parent"
262                 android:layout_height="1dp"
263                 android:background="?attr/textPrimary" />
265         </LinearLayout>
267         <!-- Zip -->
268         <TextView
269             android:id="@+id/zip_title"
270             style="@style/CaptionTextStyle"
271             android:layout_width="wrap_content"
272             android:layout_height="wrap_content"
273             android:layout_marginTop="10dp"
274             android:gravity="center_vertical"
275             android:letterSpacing="0.05"
276             android:paddingStart="3dp"
277             android:paddingEnd="0dp"
278             android:text="@string/addresses_zip"
279             android:textColor="?attr/textPrimary"
280             android:labelFor="@id/zip_input"
281             app:layout_constraintStart_toStartOf="@+id/zip_layout"
282             app:layout_constraintTop_toBottomOf="@+id/subregion_layout" />
284         <com.google.android.material.textfield.TextInputLayout
285             android:id="@+id/zip_layout"
286             android:layout_width="0dp"
287             android:layout_height="wrap_content"
288             android:textColor="?attr/textPrimary"
289             app:hintEnabled="false"
290             app:layout_constraintEnd_toEndOf="parent"
291             app:layout_constraintStart_toStartOf="parent"
292             app:layout_constraintTop_toBottomOf="@+id/zip_title">
294             <com.google.android.material.textfield.TextInputEditText
295                 android:id="@+id/zip_input"
296                 android:layout_width="match_parent"
297                 android:layout_height="wrap_content"
298                 android:ellipsize="end"
299                 android:fontFamily="sans-serif"
300                 android:imeOptions="flagNoExtractUi"
301                 android:letterSpacing="0.01"
302                 android:lineSpacingExtra="8sp"
303                 android:maxLines="1"
304                 android:singleLine="true"
305                 android:textColor="?attr/textPrimary"
306                 android:textSize="16sp" />
308         </com.google.android.material.textfield.TextInputLayout>
310         <!-- Country -->
311         <LinearLayout
312             android:id="@+id/country_layout"
313             android:layout_width="match_parent"
314             android:layout_height="wrap_content"
315             android:layout_marginTop="10dp"
316             android:paddingStart="3dp"
317             android:paddingEnd="3dp"
318             android:orientation="vertical"
319             app:layout_constraintStart_toStartOf="parent"
320             app:layout_constraintEnd_toEndOf="parent"
321             app:layout_constraintTop_toBottomOf="@id/zip_layout"
322             app:layout_constraintBottom_toTopOf="@id/phone_title">
324             <TextView
325                 style="@style/CaptionTextStyle"
326                 android:layout_width="wrap_content"
327                 android:layout_height="wrap_content"
328                 android:layout_marginTop="10dp"
329                 android:textColor="?attr/textPrimary"
330                 android:labelFor="@id/country_drop_down"
331                 android:letterSpacing="0.05"
332                 android:text="@string/addresses_country" />
334             <androidx.appcompat.widget.AppCompatSpinner
335                 android:id="@+id/country_drop_down"
336                 android:layout_width="match_parent"
337                 android:layout_height="wrap_content" />
339             <View
340                 android:layout_width="match_parent"
341                 android:layout_height="1dp"
342                 android:background="?attr/textPrimary" />
344         </LinearLayout>
346         <!-- Phone -->
347         <TextView
348             android:id="@+id/phone_title"
349             style="@style/CaptionTextStyle"
350             android:layout_width="wrap_content"
351             android:layout_height="wrap_content"
352             android:layout_marginTop="10dp"
353             android:gravity="center_vertical"
354             android:letterSpacing="0.05"
355             android:paddingStart="3dp"
356             android:paddingEnd="0dp"
357             android:text="@string/addresses_phone"
358             android:textColor="?attr/textPrimary"
359             android:labelFor="@id/phone_input"
360             app:layout_constraintStart_toStartOf="parent"
361             app:layout_constraintTop_toBottomOf="@+id/country_layout" />
363         <com.google.android.material.textfield.TextInputLayout
364             android:id="@+id/phone_layout"
365             android:layout_width="match_parent"
366             android:layout_height="wrap_content"
367             android:textColor="?attr/textPrimary"
368             app:hintEnabled="false"
369             app:layout_constraintEnd_toEndOf="parent"
370             app:layout_constraintStart_toStartOf="parent"
371             app:layout_constraintTop_toBottomOf="@+id/phone_title">
373             <com.google.android.material.textfield.TextInputEditText
374                 android:id="@+id/phone_input"
375                 android:layout_width="match_parent"
376                 android:layout_height="wrap_content"
377                 android:ellipsize="end"
378                 android:fontFamily="sans-serif"
379                 android:imeOptions="flagNoExtractUi"
380                 android:letterSpacing="0.01"
381                 android:lineSpacingExtra="8sp"
382                 android:maxLines="1"
383                 android:singleLine="true"
384                 android:textColor="?attr/textPrimary"
385                 android:textSize="16sp" />
387         </com.google.android.material.textfield.TextInputLayout>
389         <!-- Email -->
390         <TextView
391             android:id="@+id/email_title"
392             style="@style/CaptionTextStyle"
393             android:layout_width="wrap_content"
394             android:layout_height="wrap_content"
395             android:layout_marginTop="10dp"
396             android:gravity="center_vertical"
397             android:letterSpacing="0.05"
398             android:paddingStart="3dp"
399             android:paddingEnd="0dp"
400             android:text="@string/addresses_email"
401             android:textColor="?attr/textPrimary"
402             android:labelFor="@id/city_input"
403             app:layout_constraintStart_toStartOf="parent"
404             app:layout_constraintTop_toBottomOf="@+id/phone_layout" />
406         <com.google.android.material.textfield.TextInputLayout
407             android:id="@+id/email_layout"
408             android:layout_width="match_parent"
409             android:layout_height="wrap_content"
410             android:textColor="?attr/textPrimary"
411             app:hintEnabled="false"
412             app:layout_constraintEnd_toEndOf="parent"
413             app:layout_constraintStart_toStartOf="parent"
414             app:layout_constraintTop_toBottomOf="@+id/email_title">
416             <com.google.android.material.textfield.TextInputEditText
417                 android:id="@+id/email_input"
418                 android:layout_width="match_parent"
419                 android:layout_height="wrap_content"
420                 android:ellipsize="end"
421                 android:fontFamily="sans-serif"
422                 android:imeOptions="flagNoExtractUi"
423                 android:letterSpacing="0.01"
424                 android:lineSpacingExtra="8sp"
425                 android:maxLines="1"
426                 android:singleLine="true"
427                 android:textColor="?attr/textPrimary"
428                 android:textSize="16sp" />
430         </com.google.android.material.textfield.TextInputLayout>
432         <com.google.android.material.button.MaterialButton
433             android:id="@+id/delete_button"
434             style="@style/Widget.MaterialComponents.Button.TextButton"
435             android:layout_width="wrap_content"
436             android:layout_height="0dp"
437             android:layout_marginTop="16dp"
438             android:letterSpacing="0"
439             android:padding="10dp"
440             android:text="@string/addressess_delete_address_button"
441             android:textAllCaps="false"
442             android:textColor="@color/fx_mobile_text_color_warning"
443             android:visibility="gone"
444             app:layout_constraintTop_toBottomOf="@+id/email_layout"
445             app:layout_constraintStart_toStartOf="parent" />
447         <com.google.android.material.button.MaterialButton
448             android:id="@+id/cancel_button"
449             style="@style/Widget.MaterialComponents.Button.TextButton"
450             android:layout_width="wrap_content"
451             android:layout_height="0dp"
452             android:layout_marginTop="16dp"
453             android:letterSpacing="0"
454             android:padding="10dp"
455             android:text="@string/addresses_cancel_button"
456             android:textAllCaps="false"
457             android:textColor="?attr/textPrimary"
458             android:textStyle="bold"
459             app:layout_constraintTop_toBottomOf="@+id/email_layout"
460             app:layout_constraintEnd_toStartOf="@id/save_button" />
462         <com.google.android.material.button.MaterialButton
463             android:id="@+id/save_button"
464             style="@style/NeutralButton"
465             android:layout_width="wrap_content"
466             android:paddingStart="12dp"
467             android:paddingEnd="12dp"
468             android:text="@string/addresses_save_button"
469             app:layout_constraintTop_toTopOf="@+id/cancel_button"
470             app:layout_constraintBottom_toBottomOf="@id/cancel_button"
471             app:layout_constraintEnd_toEndOf="parent" />
473     </androidx.constraintlayout.widget.ConstraintLayout>
474 </androidx.core.widget.NestedScrollView>