From 9b61c6991347e10606051b6d790b8d9e52dc3ba7 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Fri, 10 Jul 2015 20:13:54 -0400 Subject: Append password from dialog, not a newly generated one --- app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java index fced4c1c..12822b3f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java @@ -61,9 +61,9 @@ public class pwgenDialogFragment extends DialogFragment { builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - setPreferences(); - TextView textView = (TextView) getActivity().findViewById(R.id.crypto_password_edit); - textView.append(pwgen.generate(getActivity().getApplicationContext()).get(0)); + TextView edit = (TextView) getActivity().findViewById(R.id.crypto_password_edit); + TextView generate = (TextView) getDialog().findViewById(R.id.passwordText); + edit.append(generate.getText()); } }); -- cgit v1.2.3