mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
added PassphraseEditText to SetPassphraseDialogFragment
This commit is contained in:
parent
c5093433f5
commit
fee891fc06
@ -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)) {
|
||||
|
@ -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) {
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user