[fenix] For https://github.com/mozilla-mobile/fenix/issues/24252 - Rename primaryText...
[gecko.git] / mobile / android / fenix / app / src / main / res / layout / fragment_edit_login.xml
blob800111597d91e53a8402465d5e0e1f53bbc9459e
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/. -->
6 <androidx.constraintlayout.widget.ConstraintLayout
7     xmlns:android="http://schemas.android.com/apk/res/android"
8     xmlns:app="http://schemas.android.com/apk/res-auto"
9     xmlns:tools="http://schemas.android.com/tools"
10     android:id="@+id/editLoginLayout"
11     android:layout_width="match_parent"
12     android:layout_height="wrap_content"
13     android:layout_marginStart="20dp"
14     android:layout_marginEnd="20dp"
15     android:layout_marginTop="16dp"
16     android:clickable="true"
17     android:focusable="true" >
19     <TextView
20         android:id="@+id/hostnameHeaderText"
21         android:layout_width="0dp"
22         android:layout_height="wrap_content"
23         android:paddingStart="3dp"
24         android:paddingEnd="0dp"
25         android:gravity="center_vertical"
26         android:text="@string/preferences_passwords_saved_logins_site"
27         android:textColor="?attr/textPrimary"
28         android:textSize="12sp"
29         android:letterSpacing="0.05"
30         app:fontFamily="@font/metropolis_semibold"
31         app:layout_constraintEnd_toEndOf="parent"
32         app:layout_constraintStart_toStartOf="parent"
33         app:layout_constraintTop_toTopOf="parent"
34         app:layout_constraintVertical_chainStyle="packed" />
36     <com.google.android.material.textfield.TextInputLayout
37         android:id="@+id/inputLayoutHostname"
38         android:layout_width="match_parent"
39         android:layout_height="wrap_content"
40         android:clickable="false"
41         android:focusable="false"
42         android:background="@android:color/transparent"
43         android:textColor="?attr/textPrimary"
44         android:layout_marginTop="12dp"
45         android:layout_marginStart="3dp"
46         android:contentDescription="@string/saved_login_hostname_description"
47         app:backgroundTint="@android:color/transparent"
48         app:hintEnabled="false"
49         app:layout_constraintEnd_toEndOf="@id/hostnameHeaderText"
50         app:layout_constraintStart_toStartOf="@id/hostnameHeaderText"
51         app:layout_constraintTop_toBottomOf="@id/hostnameHeaderText">
53         <com.google.android.material.textfield.TextInputEditText
54             android:id="@+id/hostnameText"
55             android:layout_width="match_parent"
56             android:layout_height="wrap_content"
57             android:textSize="16sp"
58             android:fontFamily="sans-serif"
59             android:textStyle="normal"
60             android:textColor="?disabled"
61             android:letterSpacing="0.01"
62             android:lineSpacingExtra="8sp"
63             android:hint="@string/saved_login_hostname_description"
64             android:inputType="textNoSuggestions"
65             android:ellipsize="end"
66             android:maxLines="1"
67             android:singleLine="true"
68             android:clickable="false"
69             android:focusable="false"
70             android:textCursorDrawable="@android:color/transparent"
71             android:background="@android:color/transparent"
72             app:backgroundTint="@android:color/transparent"
73             tools:ignore="Autofill"/>
74     </com.google.android.material.textfield.TextInputLayout>
76     <TextView
77         android:id="@+id/usernameHeader"
78         android:layout_width="0dp"
79         android:layout_height="16dp"
80         android:gravity="center_vertical"
81         android:paddingStart="3dp"
82         android:paddingEnd="0dp"
83         android:layout_marginTop="20dp"
84         android:text="@string/preferences_passwords_saved_logins_username"
85         android:textColor="?attr/textPrimary"
86         android:textSize="12sp"
87         android:letterSpacing="0.05"
88         app:fontFamily="@font/metropolis_semibold"
89         app:layout_constraintBottom_toTopOf="@id/inputLayoutUsername"
90         app:layout_constraintEnd_toStartOf="@id/clearUsernameTextButton"
91         app:layout_constraintStart_toStartOf="parent"
92         app:layout_constraintTop_toBottomOf="@id/inputLayoutHostname"
93         app:layout_constraintVertical_chainStyle="packed" />
95     <com.google.android.material.textfield.TextInputLayout
96         android:id="@+id/inputLayoutUsername"
97         android:layout_width="match_parent"
98         android:layout_height="wrap_content"
99         android:colorControlHighlight="?attr/textPrimary"
100         android:colorControlActivated="?attr/textPrimary"
101         android:textColor="?attr/textPrimary"
102         android:contentDescription="@string/saved_login_username_description"
103         app:layout_constraintEnd_toEndOf="@id/usernameHeader"
104         app:layout_constraintStart_toStartOf="@id/usernameHeader"
105         app:layout_constraintTop_toBottomOf="@id/usernameHeader"
106         app:layout_constraintVertical_chainStyle="packed"
107         app:hintEnabled="false">
109         <com.google.android.material.textfield.TextInputEditText
110             android:id="@+id/usernameText"
111             android:layout_width="match_parent"
112             android:layout_height="wrap_content"
113             android:textSize="16sp"
114             android:fontFamily="sans-serif"
115             android:textStyle="normal"
116             android:colorControlHighlight="?attr/textPrimary"
117             android:colorControlActivated="?attr/textPrimary"
118             android:textColor="?attr/textPrimary"
119             android:letterSpacing="0.01"
120             android:lineSpacingExtra="8sp"
121             android:inputType="textNoSuggestions"
122             android:ellipsize="end"
123             android:maxLines="1"
124             android:singleLine="true"
125             android:clickable="true"
126             android:focusable="true"
127             android:cursorVisible="true"
128             android:textCursorDrawable="@null"
129             app:backgroundTint="?attr/textPrimary"
130             tools:ignore="Autofill"/>
131     </com.google.android.material.textfield.TextInputLayout>
133     <ImageButton
134         android:id="@+id/clearUsernameTextButton"
135         android:layout_width="48dp"
136         android:layout_height="30dp"
137         android:layout_marginTop="3dp"
138         android:layout_marginBottom="10dp"
139         android:background="@null"
140         android:contentDescription="@string/saved_login_clear_username"
141         app:tint="@color/saved_login_clear_edit_text_tint"
142         app:layout_constraintEnd_toEndOf="parent"
143         app:layout_constraintTop_toTopOf="@id/inputLayoutUsername"
144         app:srcCompat="@drawable/mozac_ic_clear" />
146     <TextView
147         android:id="@+id/passwordHeader"
148         android:layout_width="0dp"
149         android:layout_height="wrap_content"
150         android:gravity="center_vertical"
151         android:paddingStart="3dp"
152         android:paddingEnd="0dp"
153         android:text="@string/preferences_passwords_saved_logins_password"
154         android:textColor="?attr/textPrimary"
155         android:textSize="12sp"
156         android:layout_marginTop="10dp"
157         android:letterSpacing="0.05"
158         app:fontFamily="@font/metropolis_semibold"
159         app:layout_constraintBottom_toTopOf="@id/inputLayoutPassword"
160         app:layout_constraintEnd_toStartOf="@id/revealPasswordButton"
161         app:layout_constraintStart_toStartOf="parent"
162         app:layout_constraintTop_toBottomOf="@id/inputLayoutUsername"
163         app:layout_constraintVertical_chainStyle="packed" />
165     <com.google.android.material.textfield.TextInputLayout
166         android:id="@+id/inputLayoutPassword"
167         android:layout_width="match_parent"
168         android:layout_height="wrap_content"
169         android:paddingBottom="11dp"
170         android:colorControlHighlight="?attr/textPrimary"
171         android:colorControlActivated="?attr/textPrimary"
172         android:textColor="?attr/textPrimary"
173         android:contentDescription="@string/saved_login_password_description"
174         app:hintEnabled="false"
175         app:layout_constraintBottom_toBottomOf="parent"
176         app:layout_constraintEnd_toEndOf="@id/passwordHeader"
177         app:layout_constraintStart_toStartOf="@id/passwordHeader"
178         app:layout_constraintTop_toBottomOf="@id/passwordHeader"
179         app:layout_constraintVertical_chainStyle="packed">
181         <com.google.android.material.textfield.TextInputEditText
182             android:id="@+id/passwordText"
183             android:layout_width="match_parent"
184             android:layout_height="wrap_content"
185             android:clickable="true"
186             android:colorControlActivated="?attr/textPrimary"
187             android:colorControlHighlight="?attr/textPrimary"
188             android:cursorVisible="true"
189             android:textCursorDrawable="@null"
190             android:ellipsize="end"
191             android:focusable="true"
192             android:fontFamily="sans-serif"
193             android:inputType="textNoSuggestions"
194             android:letterSpacing="0.01"
195             android:lineSpacingExtra="8sp"
196             android:maxLines="1"
197             android:singleLine="true"
198             android:textColor="?attr/textPrimary"
199             android:textSize="16sp"
200             android:textStyle="normal"
201             app:backgroundTint="?attr/textPrimary"
202             tools:ignore="Autofill" />
203     </com.google.android.material.textfield.TextInputLayout>
205     <ImageButton
206         android:id="@+id/revealPasswordButton"
207         android:layout_width="48dp"
208         android:layout_height="30dp"
209         android:layout_marginTop="3dp"
210         android:background="@null"
211         android:contentDescription="@string/saved_login_reveal_password"
212         app:tint="?attr/textPrimary"
213         app:layout_constraintEnd_toStartOf="@id/clearPasswordTextButton"
214         app:layout_constraintTop_toTopOf="@id/inputLayoutPassword"
215         app:srcCompat="@drawable/mozac_ic_password_reveal" />
217     <ImageButton
218         android:id="@+id/clearPasswordTextButton"
219         android:layout_width="48dp"
220         android:layout_height="30dp"
221         android:background="@null"
222         android:contentDescription="@string/saved_logins_clear_password"
223         app:tint="@color/saved_login_clear_edit_text_tint"
224         app:layout_constraintEnd_toEndOf="parent"
225         app:layout_constraintTop_toTopOf="@id/revealPasswordButton"
226         app:srcCompat="@drawable/mozac_ic_clear" />
227 </androidx.constraintlayout.widget.ConstraintLayout>