mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 20:53:47 +01:00
Allow cancelation of password dialog in settings screen for seed display
This commit is contained in:
parent
7ca22077d6
commit
59a5dc0794
@ -21,6 +21,7 @@ import java.io.File;
|
|||||||
|
|
||||||
public class PasswordBottomSheetDialog extends BottomSheetDialogFragment {
|
public class PasswordBottomSheetDialog extends BottomSheetDialogFragment {
|
||||||
public PasswordListener listener = null;
|
public PasswordListener listener = null;
|
||||||
|
public boolean cancelable = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
@ -30,7 +31,7 @@ public class PasswordBottomSheetDialog extends BottomSheetDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setCancelable(false);
|
setCancelable(cancelable);
|
||||||
File walletFile = new File(getActivity().getApplicationInfo().dataDir, Constants.WALLET_NAME);
|
File walletFile = new File(getActivity().getApplicationInfo().dataDir, Constants.WALLET_NAME);
|
||||||
|
|
||||||
ImageButton pastePasswordImageButton = view.findViewById(R.id.paste_password_imagebutton);
|
ImageButton pastePasswordImageButton = view.findViewById(R.id.paste_password_imagebutton);
|
||||||
|
@ -130,6 +130,7 @@ public class SettingsFragment extends Fragment implements PasswordBottomSheetDia
|
|||||||
boolean usesPassword = PrefService.getInstance().getBoolean(Constants.PREF_USES_PASSWORD, false);
|
boolean usesPassword = PrefService.getInstance().getBoolean(Constants.PREF_USES_PASSWORD, false);
|
||||||
if (usesPassword) {
|
if (usesPassword) {
|
||||||
PasswordBottomSheetDialog passwordDialog = new PasswordBottomSheetDialog();
|
PasswordBottomSheetDialog passwordDialog = new PasswordBottomSheetDialog();
|
||||||
|
passwordDialog.cancelable = true;
|
||||||
passwordDialog.listener = this;
|
passwordDialog.listener = this;
|
||||||
passwordDialog.show(getActivity().getSupportFragmentManager(), "password_dialog");
|
passwordDialog.show(getActivity().getSupportFragmentManager(), "password_dialog");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user