From 35e30a67c49055b89633b1330a0151a176a74ef2 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Thu, 31 Dec 2015 18:38:10 -0500 Subject: Comments --- .../main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java') diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java index 0ad28a31..583b5064 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java @@ -50,7 +50,7 @@ public class AutofillFragment extends DialogFragment { final String appName = getArguments().getString("appName"); isWeb = getArguments().getBoolean("isWeb"); - // set the dialog icon and title or webName editText + // set the dialog icon and title or webURL editText String iconPackageName; if (!isWeb) { iconPackageName = packageName; @@ -174,7 +174,7 @@ public class AutofillFragment extends DialogFragment { if (isWeb) { packageName = ((EditText) dialog.findViewById(R.id.webURL)).getText().toString(); - // handle some errors + // handle some errors and don't dismiss the dialog EditText webURL = (EditText) dialog.findViewById(R.id.webURL); if (packageName.equals("")) { webURL.setError("URL cannot be blank"); @@ -186,6 +186,8 @@ public class AutofillFragment extends DialogFragment { return; } } + + // write to preferences accordingly RadioGroup radioGroup = (RadioGroup) dialog.findViewById(R.id.autofill_radiogroup); switch (radioGroup.getCheckedRadioButtonId()) { case R.id.use_default: @@ -213,7 +215,7 @@ public class AutofillFragment extends DialogFragment { } editor.apply(); - // if recyclerAdapter has not loaded yet, there is no need to notify + // notify the recycler adapter if it is loaded if (callingActivity.recyclerAdapter != null) { int position; if (!isWeb) { -- cgit v1.2.3