mattsilber / applock

A simple library for locking and unlocking Activities with a PIN code or Fingerprint (e.g. a child lock).
Other
87 stars 43 forks source link

Trying to change the pin, how to close dialog after pin changed #6

Closed deshmukhrohit11 closed 6 years ago

deshmukhrohit11 commented 6 years ago

I am trying to change pin in the Settings screen. But I am not able to close the dialogue after changing the pin.

ActionLockingHelper.unlockIfRequired(mContext, new UnlockDialogBuilder.UnlockEventListener(){ public void onCanceled(){ } // Dialog was closed without entry public void onUnlockFailed(String reason){ } // Not called with default Dialog, instead is handled internally public void onUnlockSuccessful(){ new CreateLockDialogBuilder(mContext, new CreateLockDialogBuilder.LockCreationListener(){ public void onLockCanceled(){ } // Dialog was closed without entry public void onLockSuccessful(){ ActionLockingHelper.unlockIfRequired(mContext, new UnlockDialogBuilder.UnlockEventListener(){ public void onCanceled(){ } // Dialog was closed without entry public void onUnlockFailed(String reason){ } // Not called with default Dialog, instead is handled internally public void onUnlockSuccessful(){ // Want to close the dialog here } }); } }) .show(); } });