Replace password fields (WIP)

This commit is contained in:
MrLetsplay 2023-10-03 21:43:12 +02:00
parent 90db5a2d24
commit 89d1486382
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
3 changed files with 72 additions and 58 deletions

View File

@ -22,20 +22,29 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="19dp" android:layout_height="19dp"
android:text="@string/password" android:text="@string/password"
app:layout_constraintBottom_toTopOf="@+id/unlock_password" app:layout_constraintBottom_toTopOf="@+id/unlock_password_layout"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
<EditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/unlock_password" android:id="@+id/unlock_password_layout"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/unlock_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPassword"
android:hint="@string/password" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/unlock_button" android:id="@+id/unlock_button"
@ -47,7 +56,7 @@
android:textAllCaps="false" android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/unlock_password" /> app:layout_constraintTop_toBottomOf="@+id/unlock_password_layout" />
<androidx.appcompat.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/unlock_biometrics" android:id="@+id/unlock_biometrics"

View File

@ -1,29 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="16dp"> android:padding="16dp"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/input_password_text" android:id="@+id/input_password_text"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/enter_password" android:text="@string/enter_password" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/input_password" android:id="@+id/input_password"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:hint="@string/password" android:hint="@string/password"
android:inputType="textPassword" android:inputType="textPassword" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/input_password_text" />
</androidx.constraintlayout.widget.ConstraintLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout>

View File

@ -1,50 +1,53 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="16dp"> android:padding="16dp"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/set_password_text" android:id="@+id/set_password_text"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/set_password" android:text="@string/set_password" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true" >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/set_password" android:id="@+id/set_password"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:hint="@string/password" android:hint="@string/set_password"
android:inputType="textPassword" android:inputType="textPassword" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" </com.google.android.material.textfield.TextInputLayout>
app:layout_constraintTop_toBottomOf="@+id/set_password_text" />
<TextView <TextView
android:id="@+id/confirm_password_text" android:id="@+id/confirm_password_text"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/confirm_password" android:text="@string/confirm_password"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="10dp" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/set_password" />
<EditText <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true" >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/confirm_password" android:id="@+id/confirm_password"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:hint="@string/password" android:hint="@string/confirm_password"
android:inputType="textPassword" android:inputType="textPassword" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/confirm_password_text" />
</androidx.constraintlayout.widget.ConstraintLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout>