In the dialog that appears to choose a security lock, changed its title and modified the list to use a single choice list with radio buttons and pre-selecting the actual security lock option.
This commit is contained in:
parent
2b7cd1c8c1
commit
2a869d7fe8
5 changed files with 23 additions and 13 deletions
|
@ -179,7 +179,7 @@ class PatternSecurityLockDialog : BaseSecurityLockDialog() {
|
||||||
patternLockView.isInputEnabled = true
|
patternLockView.isInputEnabled = true
|
||||||
btnClear.visibility = View.INVISIBLE
|
btnClear.visibility = View.INVISIBLE
|
||||||
btnNext.isEnabled = false
|
btnNext.isEnabled = false
|
||||||
btnNext.text = getString(R.string.btn__confirm)
|
btnNext.text = getString(R.string.button__confirm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.callbacks.onDismiss
|
import com.afollestad.materialdialogs.callbacks.onDismiss
|
||||||
import com.afollestad.materialdialogs.customview.customView
|
import com.afollestad.materialdialogs.customview.customView
|
||||||
import com.afollestad.materialdialogs.list.customListAdapter
|
import com.afollestad.materialdialogs.list.customListAdapter
|
||||||
import com.afollestad.materialdialogs.list.listItems
|
import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
||||||
import cy.agorise.bitsybitshareswallet.BuildConfig
|
import cy.agorise.bitsybitshareswallet.BuildConfig
|
||||||
import cy.agorise.bitsybitshareswallet.R
|
import cy.agorise.bitsybitshareswallet.R
|
||||||
import cy.agorise.bitsybitshareswallet.adapters.FullNodesAdapter
|
import cy.agorise.bitsybitshareswallet.adapters.FullNodesAdapter
|
||||||
|
@ -282,10 +282,18 @@ class SettingsFragment : Fragment(), ServiceConnection, BaseSecurityLockDialog.O
|
||||||
* Shows a dialog so the user can select its desired Security Lock option.
|
* Shows a dialog so the user can select its desired Security Lock option.
|
||||||
*/
|
*/
|
||||||
private fun showChooseSecurityLockDialog() {
|
private fun showChooseSecurityLockDialog() {
|
||||||
|
// Obtain the current Security Lock Option selected and display it in the screen
|
||||||
|
val securityLockSelected = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
.getInt(Constants.KEY_SECURITY_LOCK_SELECTED, 0)
|
||||||
|
// Security Lock Options
|
||||||
|
// 0 -> None
|
||||||
|
// 1 -> PIN
|
||||||
|
// 2 -> Pattern
|
||||||
|
|
||||||
context?.let {
|
context?.let {
|
||||||
MaterialDialog(it).show {
|
MaterialDialog(it).show {
|
||||||
title(R.string.title__security_dialog)
|
title(R.string.title__security_dialog)
|
||||||
listItems(R.array.security_lock_options) {_, index, _ ->
|
listItemsSingleChoice(R.array.security_lock_options, initialSelection = securityLockSelected) {_, index, _ ->
|
||||||
// Args used for both PIN and Pattern options
|
// Args used for both PIN and Pattern options
|
||||||
val args = Bundle()
|
val args = Bundle()
|
||||||
args.putInt(BaseSecurityLockDialog.KEY_STEP_SECURITY_LOCK,
|
args.putInt(BaseSecurityLockDialog.KEY_STEP_SECURITY_LOCK,
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
style="@style/Widget.Bitsy.Button.TextButton"
|
style="@style/Widget.Bitsy.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/btn__clear"
|
android:text="@string/button__clear"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
style="@style/Widget.Bitsy.Button"
|
style="@style/Widget.Bitsy.Button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/btn__next"
|
android:text="@string/button__next"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,11 @@
|
||||||
<!-- Security Settings -->
|
<!-- Security Settings -->
|
||||||
<string name="title__security">Seguridad</string>
|
<string name="title__security">Seguridad</string>
|
||||||
<string name="text__security_lock">Bloqueo de Seguridad</string>
|
<string name="text__security_lock">Bloqueo de Seguridad</string>
|
||||||
<string name="title__security_dialog">Choose Security Lock</string>
|
<string name="title__security_dialog">Elige un Bloqueo de Seguridad</string>
|
||||||
<string name="text__pin">PIN</string>
|
<string name="text__pin">PIN</string>
|
||||||
<string name="text__pattern">Patrón</string>
|
<string name="text__pattern">Patrón</string>
|
||||||
<string name="text__none">Ninguno</string>
|
<string name="text__none">Ninguno</string>
|
||||||
|
<string name="button__choose">Elegir</string>
|
||||||
<string name="title__re_enter_your_pin">Reingresa tu PIN</string>
|
<string name="title__re_enter_your_pin">Reingresa tu PIN</string>
|
||||||
<string name="msg__enter_your_pin">Digita tu PIN de BiTSy para continuar</string>
|
<string name="msg__enter_your_pin">Digita tu PIN de BiTSy para continuar</string>
|
||||||
<string name="error__wrong_pin">PIN incorrecto</string>
|
<string name="error__wrong_pin">PIN incorrecto</string>
|
||||||
|
@ -155,11 +156,11 @@
|
||||||
<string name="msg__enter_your_pattern">Ingresa tu patrón de BiTSy para continuar</string>
|
<string name="msg__enter_your_pattern">Ingresa tu patrón de BiTSy para continuar</string>
|
||||||
<string name="msg__set_bitsy_pattern">Por seguridad, crea un patrón para BiTSy</string>
|
<string name="msg__set_bitsy_pattern">Por seguridad, crea un patrón para BiTSy</string>
|
||||||
<string name="msg__release_finger">Suelta tu dedo al terminar</string>
|
<string name="msg__release_finger">Suelta tu dedo al terminar</string>
|
||||||
<string name="btn__clear">Limpiar</string>
|
<string name="button__clear">Limpiar</string>
|
||||||
<string name="btn__next">Siguiente</string>
|
<string name="button__next">Siguiente</string>
|
||||||
<string name="text__draw_an_unlock_pattern">Dibuja un patrón de desbloqueo</string>
|
<string name="text__draw_an_unlock_pattern">Dibuja un patrón de desbloqueo</string>
|
||||||
<string name="msg__draw_pattern_confirm">Dibuja tu patrón de nuevo para confirmar</string>
|
<string name="msg__draw_pattern_confirm">Dibuja tu patrón de nuevo para confirmar</string>
|
||||||
<string name="btn__confirm">Confirmar</string>
|
<string name="button__confirm">Confirmar</string>
|
||||||
<string name="msg__your_new_unlock_pattern">Tu nuevo patrón de desbloqueo</string>
|
<string name="msg__your_new_unlock_pattern">Tu nuevo patrón de desbloqueo</string>
|
||||||
<string name="error__wront_pattern">Patrón incorrecto</string>
|
<string name="error__wront_pattern">Patrón incorrecto</string>
|
||||||
<string name="text__pattern_recorded">Patrón registrado</string>
|
<string name="text__pattern_recorded">Patrón registrado</string>
|
||||||
|
|
|
@ -141,10 +141,11 @@
|
||||||
<!-- Security Settings -->
|
<!-- Security Settings -->
|
||||||
<string name="title__security">Security</string>
|
<string name="title__security">Security</string>
|
||||||
<string name="text__security_lock">Security Lock</string>
|
<string name="text__security_lock">Security Lock</string>
|
||||||
<string name="title__security_dialog">Choose Security Lock</string>
|
<string name="title__security_dialog">Choose a Security Lock</string>
|
||||||
<string name="text__pin">PIN</string>
|
<string name="text__pin">PIN</string>
|
||||||
<string name="text__pattern">Pattern</string>
|
<string name="text__pattern">Pattern</string>
|
||||||
<string name="text__none">None</string>
|
<string name="text__none">None</string>
|
||||||
|
<string name="button__choose">Choose</string>
|
||||||
<string name="title__re_enter_your_pin">Re-enter your PIN</string>
|
<string name="title__re_enter_your_pin">Re-enter your PIN</string>
|
||||||
<string name="msg__enter_your_pin">Enter your BiTSy PIN to continue</string>
|
<string name="msg__enter_your_pin">Enter your BiTSy PIN to continue</string>
|
||||||
<string name="error__wrong_pin">Wrong PIN</string>
|
<string name="error__wrong_pin">Wrong PIN</string>
|
||||||
|
@ -156,11 +157,11 @@
|
||||||
<string name="msg__enter_your_pattern">Enter your BiTSy pattern to continue</string>
|
<string name="msg__enter_your_pattern">Enter your BiTSy pattern to continue</string>
|
||||||
<string name="msg__set_bitsy_pattern">For security, set BiTSy pattern</string>
|
<string name="msg__set_bitsy_pattern">For security, set BiTSy pattern</string>
|
||||||
<string name="msg__release_finger">Release finger when done</string>
|
<string name="msg__release_finger">Release finger when done</string>
|
||||||
<string name="btn__clear">Clear</string>
|
<string name="button__clear">Clear</string>
|
||||||
<string name="btn__next">Next</string>
|
<string name="button__next">Next</string>
|
||||||
<string name="text__draw_an_unlock_pattern">Draw an unlock pattern</string>
|
<string name="text__draw_an_unlock_pattern">Draw an unlock pattern</string>
|
||||||
<string name="msg__draw_pattern_confirm">Draw pattern again to confirm</string>
|
<string name="msg__draw_pattern_confirm">Draw pattern again to confirm</string>
|
||||||
<string name="btn__confirm">Confirm</string>
|
<string name="button__confirm">Confirm</string>
|
||||||
<string name="msg__your_new_unlock_pattern">Your new unlock pattern</string>
|
<string name="msg__your_new_unlock_pattern">Your new unlock pattern</string>
|
||||||
<string name="error__wront_pattern">Wrong pattern</string>
|
<string name="error__wront_pattern">Wrong pattern</string>
|
||||||
<string name="text__pattern_recorded">Pattern recorded</string>
|
<string name="text__pattern_recorded">Pattern recorded</string>
|
||||||
|
|
Loading…
Reference in a new issue