This commit is contained in:
Benoit Marty 2021-02-15 10:01:38 +01:00
parent 7c865e1a26
commit e75e48f377
14 changed files with 15 additions and 53 deletions

View File

@ -33,11 +33,11 @@ class RevealPasswordImageView @JvmOverloads constructor(
fun render(isPasswordShown: Boolean) {
if (isPasswordShown) {
setImageResource(R.drawable.ic_eye_closed)
contentDescription = context.getString(R.string.a11y_hide_password)
setImageResource(R.drawable.ic_eye_closed)
} else {
setImageResource(R.drawable.ic_eye)
contentDescription = context.getString(R.string.a11y_show_password)
setImageResource(R.drawable.ic_eye)
}
}
}

View File

@ -27,11 +27,8 @@
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</LinearLayout>

View File

@ -26,14 +26,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/exportDialogTil"
app:layout_constraintTop_toTopOf="@id/exportDialogTil"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
<com.google.android.material.textfield.TextInputLayout

View File

@ -50,14 +50,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/importDialogTil"
app:layout_constraintTop_toTopOf="@id/importDialogTil"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/dialog_e2e_keys_import_button"

View File

@ -54,11 +54,8 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</FrameLayout>

View File

@ -69,14 +69,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ssss_passphrase_enter_til"
app:layout_constraintTop_toTopOf="@+id/ssss_passphrase_enter_til"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?colorAccent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/bootstrapSubmit"

View File

@ -69,14 +69,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/bootstrapRecoveryKeyEnterTil"
app:layout_constraintTop_toTopOf="@+id/bootstrapRecoveryKeyEnterTil"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?colorAccent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/bootstrapMigrateContinueButton"

View File

@ -68,14 +68,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/keys_backup_passphrase_enter_til"
app:layout_constraintTop_toTopOf="@+id/keys_backup_passphrase_enter_til"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?colorAccent" />
<TextView
android:id="@+id/helperTextWithLink"

View File

@ -75,12 +75,10 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/keys_backup_setup_step2_passphrase_enter_til"
app:layout_constraintTop_toTopOf="@id/keys_backup_setup_step2_passphrase_enter_til"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
<im.vector.app.core.ui.views.PasswordStrengthBar
android:id="@+id/keys_backup_setup_step2_passphrase_strength_level"

View File

@ -94,11 +94,8 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</FrameLayout>

View File

@ -82,11 +82,8 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</FrameLayout>

View File

@ -60,11 +60,8 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</FrameLayout>

View File

@ -83,14 +83,11 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ssss_passphrase_enter_til"
app:layout_constraintTop_toTopOf="@+id/ssss_passphrase_enter_til"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?colorAccent" />
<!-- -->

View File

@ -41,11 +41,8 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />
app:tint="?attr/colorAccent" />
</FrameLayout>