added PassphraseEditText to SetPassphraseDialogFragment

This commit is contained in:
Adithya Abraham Philip 2015-03-06 22:00:30 +05:30
parent c5093433f5
commit fee891fc06
3 changed files with 6 additions and 6 deletions

View File

@ -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)) {

View File

@ -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) {

View File

@ -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"