aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src
diff options
context:
space:
mode:
authorAdithya Abraham Philip <adithyaphilip@gmail.com>2015-03-06 22:00:30 +0530
committerAdithya Abraham Philip <adithyaphilip@gmail.com>2015-03-06 22:00:30 +0530
commitfee891fc0647ef0bd709b7bf37fb85a444a6b2ea (patch)
treebd71c14a05bfdf563a37c3a267c2439c617c7498 /OpenKeychain/src
parentc5093433f58d019116ac2d4396f81abae98dbac8 (diff)
downloadopen-keychain-fee891fc0647ef0bd709b7bf37fb85a444a6b2ea.tar.gz
open-keychain-fee891fc0647ef0bd709b7bf37fb85a444a6b2ea.tar.bz2
open-keychain-fee891fc0647ef0bd709b7bf37fb85a444a6b2ea.zip
added PassphraseEditText to SetPassphraseDialogFragment
Diffstat (limited to 'OpenKeychain/src')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java8
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/PassphraseEditText.java2
-rw-r--r--OpenKeychain/src/main/res/layout/passphrase_repeat_dialog.xml2
3 files changed, 6 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
index 9e1f21f60..93d445467 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
@@ -43,6 +43,7 @@ import android.widget.Toast;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
+import org.sufficientlysecure.keychain.ui.widget.PassphraseEditText;
import org.sufficientlysecure.keychain.ui.widget.PasswordEditText;
import org.sufficientlysecure.keychain.ui.widget.passwordstrengthindicator.PasswordStrengthView;
import org.sufficientlysecure.keychain.util.Log;
@@ -57,10 +58,9 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
public static final String MESSAGE_NEW_PASSPHRASE = "new_passphrase";
private Messenger mMessenger;
- private PasswordEditText mPassphraseEditText;
+ private PassphraseEditText mPassphraseEditText;
private EditText mPassphraseAgainEditText;
private CheckBox mNoPassphraseCheckBox;
- private PasswordStrengthView mPassphraseStrengthView;
/**
* Creates new instance of this dialog fragment
@@ -100,11 +100,9 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
View view = inflater.inflate(R.layout.passphrase_repeat_dialog, null);
alert.setView(view);
- mPassphraseEditText = (PasswordEditText) view.findViewById(R.id.passphrase_passphrase);
+ mPassphraseEditText = (PassphraseEditText) view.findViewById(R.id.passphrase_passphrase);
mPassphraseAgainEditText = (EditText) view.findViewById(R.id.passphrase_passphrase_again);
mNoPassphraseCheckBox = (CheckBox) view.findViewById(R.id.passphrase_no_passphrase);
- mPassphraseStrengthView = (PasswordStrengthView) view.findViewById(R.id.passphrase_repeat_passphrase_strength);
- mPassphraseEditText.setPasswordStrengthView(mPassphraseStrengthView);
if (TextUtils.isEmpty(oldPassphrase)) {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/PassphraseEditText.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/PassphraseEditText.java
index bd623165f..09aeba5dd 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/PassphraseEditText.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/PassphraseEditText.java
@@ -48,6 +48,8 @@ public class PassphraseEditText extends EditText {
getPaddingRight() + (int) barGap + mPasswordBarWidth, getPaddingBottom());
mPasswordStrengthBarView = new PasswordStrengthBarView(context, attrs);
+ mPasswordStrengthBarView.setShowGuides(false);
+
this.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
diff --git a/OpenKeychain/src/main/res/layout/passphrase_repeat_dialog.xml b/OpenKeychain/src/main/res/layout/passphrase_repeat_dialog.xml
index 11355bbc0..ed14b81c9 100644
--- a/OpenKeychain/src/main/res/layout/passphrase_repeat_dialog.xml
+++ b/OpenKeychain/src/main/res/layout/passphrase_repeat_dialog.xml
@@ -21,7 +21,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp">
- <org.sufficientlysecure.keychain.ui.widget.PasswordEditText
+ <org.sufficientlysecure.keychain.ui.widget.PassphraseEditText
android:id="@+id/passphrase_passphrase"
android:layout_width="match_parent"
android:layout_height="wrap_content"