diff --git a/app/src/main/java/net/mynero/wallet/fragment/dialog/PasswordBottomSheetDialog.java b/app/src/main/java/net/mynero/wallet/fragment/dialog/PasswordBottomSheetDialog.java index a52d1c6..affb5d5 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/dialog/PasswordBottomSheetDialog.java +++ b/app/src/main/java/net/mynero/wallet/fragment/dialog/PasswordBottomSheetDialog.java @@ -21,6 +21,7 @@ import java.io.File; public class PasswordBottomSheetDialog extends BottomSheetDialogFragment { public PasswordListener listener = null; + public boolean cancelable = false; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -30,7 +31,7 @@ public class PasswordBottomSheetDialog extends BottomSheetDialogFragment { @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - setCancelable(false); + setCancelable(cancelable); File walletFile = new File(getActivity().getApplicationInfo().dataDir, Constants.WALLET_NAME); ImageButton pastePasswordImageButton = view.findViewById(R.id.paste_password_imagebutton); diff --git a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java index d5f4b2d..13242a0 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java +++ b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java @@ -130,6 +130,7 @@ public class SettingsFragment extends Fragment implements PasswordBottomSheetDia boolean usesPassword = PrefService.getInstance().getBoolean(Constants.PREF_USES_PASSWORD, false); if (usesPassword) { PasswordBottomSheetDialog passwordDialog = new PasswordBottomSheetDialog(); + passwordDialog.cancelable = true; passwordDialog.listener = this; passwordDialog.show(getActivity().getSupportFragmentManager(), "password_dialog"); } else {