diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-09 12:51:00 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-09 12:51:00 +0100 |
commit | 7ac4f63ea367eaa4d560b04a211ed936da920685 (patch) | |
tree | 2e5067afbb36ca93e92b46c4d72c9c0c589eddd3 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java | |
parent | 4f11fb5a2f08ecf5fb81c86d590d04387cd1cd9a (diff) | |
parent | 820005bc378ba91a9851902b651dfff7836c9bbf (diff) | |
download | open-keychain-7ac4f63ea367eaa4d560b04a211ed936da920685.tar.gz open-keychain-7ac4f63ea367eaa4d560b04a211ed936da920685.tar.bz2 open-keychain-7ac4f63ea367eaa4d560b04a211ed936da920685.zip |
Merge pull request #1111 from adithyaphilip/passphrase-strength-indicator
Passphrase strength indicator
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java index d7270ff58..bc5018497 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/passwordstrengthindicator/PasswordStrengthView.java @@ -56,9 +56,6 @@ import org.sufficientlysecure.keychain.R; */ public class PasswordStrengthView extends View { - protected static final int COLOR_FAIL = Color.parseColor("#e74c3c"); - protected static final int COLOR_WEAK = Color.parseColor("#e67e22"); - protected static final int COLOR_STRONG = Color.parseColor("#2ecc71"); protected int mMinWidth; protected int mMinHeight; @@ -100,6 +97,11 @@ public class PasswordStrengthView extends View { public PasswordStrengthView(Context context, AttributeSet attrs) { super(context, attrs); + + int COLOR_FAIL = context.getResources().getColor(R.color.android_red_light); + int COLOR_WEAK = context.getResources().getColor(R.color.android_orange_light); + int COLOR_STRONG = context.getResources().getColor(R.color.android_green_light); + TypedArray style = context.getTheme().obtainStyledAttributes( attrs, R.styleable.PasswordStrengthView, |