diff --git a/app/src/main/java/org/mifos/mobile/ui/activities/PassCodeActivity.java b/app/src/main/java/org/mifos/mobile/ui/activities/PassCodeActivity.java index daa8ef2ef..e469d9482 100644 --- a/app/src/main/java/org/mifos/mobile/ui/activities/PassCodeActivity.java +++ b/app/src/main/java/org/mifos/mobile/ui/activities/PassCodeActivity.java @@ -1,6 +1,7 @@ package org.mifos.mobile.ui.activities; import android.Manifest; +import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.View; @@ -11,6 +12,7 @@ import org.mifos.mobile.R; import org.mifos.mobile.utils.CheckSelfPermissionAndRequest; import org.mifos.mobile.utils.Constants; +import org.mifos.mobile.utils.MaterialDialog; import org.mifos.mobile.utils.Toaster; public class PassCodeActivity extends MifosPassCodeActivity { @@ -51,10 +53,30 @@ public void startNextActivity() { @Override public void startLoginActivity() { - Intent i = new Intent(PassCodeActivity.this, LoginActivity.class); - i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); - startActivity(i); - finish(); + new MaterialDialog.Builder().init(PassCodeActivity.this) + .setCancelable(false) + .setMessage(R.string.login_using_password_confirmation) + .setPositiveButton(getString(R.string.logout), + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Intent i = new Intent(PassCodeActivity.this, + LoginActivity.class); + i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent. + FLAG_ACTIVITY_CLEAR_TASK); + startActivity(i); + finish(); + } + }) + .setNegativeButton(getString(R.string.cancel), + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + } + }) + .createMaterialDialog() + .show(); } @Override diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f008951e9..6cafc61b8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -338,6 +338,8 @@ Are you sure you want to delete this Beneficiary + Are you sure you want to login using Password? + Delete Beneficiary deleted successfully Third Party Transfer