diff options
author | Lukas Zorich <lukas.zorich@gmail.com> | 2015-03-03 18:52:10 -0300 |
---|---|---|
committer | Lukas Zorich <lukas.zorich@gmail.com> | 2015-03-03 18:52:10 -0300 |
commit | 438314c4bb092235331484262183d68810d6cd8f (patch) | |
tree | 7e2bc3cba3ba6228679a571cb585347a09d26b5e /OpenKeychain/src/main/java/org/sufficientlysecure | |
parent | 7f9c663033f843b43eb36f72fcace658ad25bac3 (diff) | |
download | open-keychain-438314c4bb092235331484262183d68810d6cd8f.tar.gz open-keychain-438314c4bb092235331484262183d68810d6cd8f.tar.bz2 open-keychain-438314c4bb092235331484262183d68810d6cd8f.zip |
Integrates passphrase strength indicator to create key wizard.
This commit patches issue #1050. The padding set in the passphrase edit
text is set programmatically because there is a bug in appcompat-v7
where padding via xml doesn't work:
http://code.google.com/p/android/issues/detail?id=77982
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyInputFragment.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyInputFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyInputFragment.java index d3b6cb36c..091418304 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyInputFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyInputFragment.java @@ -134,6 +134,12 @@ public class CreateKeyInputFragment extends Fragment { ) ); + // Edit text padding doesn't work via xml (http://code.google.com/p/android/issues/detail?id=77982) + // so we set the right padding programmatically. + mPassphraseEdit.setPadding(mPassphraseEdit.getPaddingLeft(), + mPassphraseEdit.getPaddingTop(), + (int) (56 * getResources().getDisplayMetrics().density), + mPassphraseEdit.getPaddingBottom()); mPassphraseEdit.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { |