Relace eye and eye_closed icons.

This commit is contained in:
Onuray Sahin 2020-07-13 17:26:23 +03:00
parent 18bc40fb66
commit a7fea8d012
39 changed files with 47 additions and 30 deletions

View File

@ -68,7 +68,7 @@ class ExportKeysDialog {
passwordVisible = !passwordVisible
passPhrase1EditText.showPassword(passwordVisible)
passPhrase2EditText.showPassword(passwordVisible)
showPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
showPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
val exportDialog = builder.show()

View File

@ -49,7 +49,7 @@ class PromptPasswordDialog {
showPassword.setOnClickListener {
passwordVisible = !passwordVisible
passwordEditText.showPassword(passwordVisible)
showPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
showPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
AlertDialog.Builder(activity)

View File

@ -74,7 +74,7 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
viewModel.showPasswordMode.observe(viewLifecycleOwner, Observer {
val shouldBeVisible = it ?: false
mPassphraseTextEdit.showPassword(shouldBeVisible)
mPassphraseReveal.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
mPassphraseReveal.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
})
mPassphraseTextEdit.setOnEditorActionListener { _, actionId, _ ->

View File

@ -139,7 +139,7 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment()
val shouldBeVisible = it ?: false
mPassphraseTextEdit.showPassword(shouldBeVisible)
mPassphraseConfirmTextEdit.showPassword(shouldBeVisible)
mPassphraseReveal.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
mPassphraseReveal.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
})
viewModel.confirmPassphraseError.observe(viewLifecycleOwner, Observer {

View File

@ -97,6 +97,6 @@ class SharedSecuredStoragePassphraseFragment @Inject constructor(
override fun invalidate() = withState(sharedViewModel) { state ->
val shouldBeVisible = state.passphraseVisible
ssss_passphrase_enter_edittext.showPassword(shouldBeVisible)
ssss_view_show_password.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
ssss_view_show_password.setImageResource(if (shouldBeVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
}

View File

@ -101,7 +101,7 @@ class BootstrapAccountPasswordFragment @Inject constructor(
if (state.step is BootstrapStep.AccountPassword) {
val isPasswordVisible = state.step.isPasswordVisible
bootstrapAccountPasswordEditText.showPassword(isPasswordVisible, updateCursor = false)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
}
}

View File

@ -103,7 +103,7 @@ class BootstrapConfirmPassphraseFragment @Inject constructor() : VectorBaseFragm
if (state.step is BootstrapStep.ConfirmPassphrase) {
val isPasswordVisible = state.step.isPasswordVisible
ssss_passphrase_enter_edittext.showPassword(isPasswordVisible, updateCursor = false)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
}
}

View File

@ -97,7 +97,7 @@ class BootstrapEnterPassphraseFragment @Inject constructor() : VectorBaseFragmen
if (state.step is BootstrapStep.SetupPassphrase) {
val isPasswordVisible = state.step.isPasswordVisible
ssss_passphrase_enter_edittext.showPassword(isPasswordVisible, updateCursor = false)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
ssss_view_show_password.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
state.passphraseStrength.invoke()?.let { strength ->
val score = strength.score

View File

@ -129,7 +129,7 @@ class BootstrapMigrateBackupFragment @Inject constructor(
if (state.step is BootstrapStep.GetBackupSecretPassForMigration) {
val isPasswordVisible = state.step.isPasswordVisible
bootstrapMigrateEditText.showPassword(isPasswordVisible, updateCursor = false)
bootstrapMigrateShowPassword.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
bootstrapMigrateShowPassword.setImageResource(if (isPasswordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
bootstrapDescriptionText.text = getString(R.string.bootstrap_migration_enter_backup_password)

View File

@ -221,10 +221,10 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() {
passwordField.showPassword(passwordShown)
if (passwordShown) {
passwordReveal.setImageResource(R.drawable.ic_eye_closed_black)
passwordReveal.setImageResource(R.drawable.ic_eye_closed)
passwordReveal.contentDescription = getString(R.string.a11y_hide_password)
} else {
passwordReveal.setImageResource(R.drawable.ic_eye_black)
passwordReveal.setImageResource(R.drawable.ic_eye)
passwordReveal.contentDescription = getString(R.string.a11y_show_password)
}
}

View File

@ -124,10 +124,10 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment()
passwordField.showPassword(passwordShown)
if (passwordShown) {
passwordReveal.setImageResource(R.drawable.ic_eye_closed_black)
passwordReveal.setImageResource(R.drawable.ic_eye_closed)
passwordReveal.contentDescription = getString(R.string.a11y_hide_password)
} else {
passwordReveal.setImageResource(R.drawable.ic_eye_black)
passwordReveal.setImageResource(R.drawable.ic_eye)
passwordReveal.contentDescription = getString(R.string.a11y_show_password)
}
}

View File

@ -817,7 +817,7 @@ private fun showEmailValidationDialog(pid: ThreePid) {
newPasswordText.showPassword(passwordShown)
confirmNewPasswordText.showPassword(passwordShown)
showPassword.setImageResource(if (passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
showPassword.setImageResource(if (passwordShown) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
val dialog = AlertDialog.Builder(activity)

View File

@ -114,6 +114,6 @@ class DeactivateAccountFragment @Inject constructor(
override fun invalidate() = withState(viewModel) { state ->
deactivateAccountPassword.showPassword(state.passwordShown)
deactivateAccountPasswordReveal.setImageResource(if (state.passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
deactivateAccountPasswordReveal.setImageResource(if (state.passwordShown) R.drawable.ic_eye_closed else R.drawable.ic_eye)
}
}

View File

@ -78,10 +78,10 @@ abstract class LoginPasswordFormItem : VectorEpoxyModel<LoginPasswordFormItem.Ho
holder.passwordField.showPassword(passwordShown)
if (passwordShown) {
holder.passwordReveal.setImageResource(R.drawable.ic_eye_closed_black)
holder.passwordReveal.setImageResource(R.drawable.ic_eye_closed)
holder.passwordReveal.contentDescription = stringProvider.getString(R.string.a11y_hide_password)
} else {
holder.passwordReveal.setImageResource(R.drawable.ic_eye_black)
holder.passwordReveal.setImageResource(R.drawable.ic_eye)
holder.passwordReveal.contentDescription = stringProvider.getString(R.string.a11y_show_password)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="24dp"
android:viewportWidth="25"
android:viewportHeight="24">
<path
android:pathData="M22.7361,9.9197C23.6693,11.1729 23.6895,12.8384 22.7728,14.1036C21.0553,16.4739 17.6416,20 12.5317,20C7.4217,20 4.008,16.4739 2.2906,14.1036C1.3738,12.8384 1.394,11.1729 2.3273,9.9197C4.0926,7.5494 7.5651,4 12.5317,4C17.4982,4 20.9708,7.5494 22.7361,9.9197ZM17.8334,12C17.8334,14.9455 15.4456,17.3333 12.5001,17.3333C9.5546,17.3333 7.1668,14.9455 7.1668,12C7.1668,9.0545 9.5546,6.6667 12.5001,6.6667C15.4456,6.6667 17.8334,9.0545 17.8334,12ZM12.5001,14.6667C13.9729,14.6667 15.1668,13.4728 15.1668,12C15.1668,10.5272 13.9729,9.3333 12.5001,9.3333C11.0274,9.3333 9.8335,10.5272 9.8335,12C9.8335,13.4728 11.0274,14.6667 12.5001,14.6667Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff" android:fillType="evenOdd" android:pathData="M5.4447,6.2731C3.8736,7.4199 2.6604,8.8011 1.8273,9.9197C0.894,11.1729 0.8738,12.8384 1.7906,14.1036C3.508,16.4739 6.9217,20 12.0317,20C14.2012,20 16.065,19.3644 17.623,18.4514L15.3344,16.1628C14.4212,16.8952 13.2618,17.3333 12.0002,17.3333C9.0546,17.3333 6.6668,14.9455 6.6668,12C6.6668,10.7383 7.1049,9.5789 7.8373,8.6657L5.4447,6.2731ZM17.3119,12.4834C17.3262,12.3242 17.3335,12.163 17.3335,12C17.3335,9.0545 14.9457,6.6667 12.0002,6.6667C11.8372,6.6667 11.6759,6.674 11.5167,6.6883L9.2201,4.3917C10.0958,4.1434 11.0336,4 12.0317,4C16.9982,4 20.4708,7.5494 22.2361,9.9197C23.1693,11.1729 23.1895,12.8384 22.2728,14.1036C21.8639,14.6678 21.359,15.2975 20.758,15.9296L17.3119,12.4834ZM9.7461,10.5745C9.4848,10.9868 9.3335,11.4757 9.3335,12C9.3335,13.4728 10.5274,14.6667 12.0002,14.6667C12.5244,14.6667 13.0133,14.5154 13.4257,14.2541L9.7461,10.5745Z"/>
<path android:fillColor="#00000000" android:pathData="M1,1L23,23"
android:strokeColor="#ffffff" android:strokeLineCap="round" android:strokeWidth="2"/>
</vector>

View File

@ -30,7 +30,7 @@
android:layout_height="@dimen/layout_touch_size"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent" />
</LinearLayout>

View File

@ -28,7 +28,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/exportDialogTil"

View File

@ -58,7 +58,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
tools:contentDescription="@string/a11y_show_password" />

View File

@ -50,7 +50,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/bootstrapAccountPasswordTil"

View File

@ -70,7 +70,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ssss_passphrase_enter_til"

View File

@ -70,7 +70,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/bootstrapRecoveryKeyEnterTil"

View File

@ -86,7 +86,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
tools:contentDescription="@string/a11y_show_password" />

View File

@ -68,7 +68,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/keys_backup_passphrase_enter_til"

View File

@ -76,7 +76,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/keys_backup_passphrase_enter_til"

View File

@ -100,7 +100,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
tools:contentDescription="@string/a11y_show_password" />

View File

@ -90,7 +90,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
tools:contentDescription="@string/a11y_show_password" />

View File

@ -83,7 +83,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ssss_passphrase_enter_til"

View File

@ -43,7 +43,7 @@
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_eye_black"
android:src="@drawable/ic_eye"
android:tint="?attr/colorAccent"
tools:contentDescription="@string/a11y_show_password" />