From 5caa665111e1e3852a8fafd207e876f346492f9e Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Fri, 14 Aug 2015 17:00:28 -0400 Subject: Ensure enable autofill checkbox appearance matches setting --- app/src/main/java/com/zeapo/pwdstore/UserPreference.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java index 283d5f47..b034ba82 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java @@ -212,14 +212,15 @@ public class UserPreference extends AppCompatActivity { startActivity(intent); } }). - setNegativeButton(R.string.dialog_cancel,new DialogInterface.OnClickListener() { + setNegativeButton(R.string.dialog_cancel, null). + setOnDismissListener(new DialogInterface.OnDismissListener() { @Override - public void onClick(DialogInterface dialog, int which) { + public void onDismiss(DialogInterface dialog) { ((CheckBoxPreference) findPreference("autofill_enable")) .setChecked(((UserPreference) getActivity()).isServiceEnabled()); } }).show(); - return false; + return true; } }); } -- cgit v1.2.3