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/res/layout | |
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/res/layout')
-rw-r--r-- | OpenKeychain/src/main/res/layout/create_key_input_fragment.xml | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml b/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml index 76a58acb1..d59cd7b86 100644 --- a/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml +++ b/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml @@ -59,27 +59,34 @@ android:layout_height="wrap_content" android:text="@string/label_passphrase" /> - <EditText - android:id="@+id/create_key_passphrase" + <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" - android:imeOptions="actionNext" - android:inputType="textPassword" - android:hint="@string/label_passphrase" - android:ems="10" - android:layout_gravity="center_horizontal" /> - - <org.sufficientlysecure.keychain.ui.widget.passwordstrengthindicator.PasswordStrengthBarView - android:id="@+id/create_key_passphrase_strength" - android:layout_width="match_parent" - android:layout_height="8dp" - android:layout_marginBottom="8dp" - custom:strength="medium" - custom:showGuides="false" - custom:color_fail="@color/android_red_light" - custom:color_weak="@color/android_orange_light" - custom:color_strong="@color/android_green_light"/> + android:layout_marginBottom="8dp"> + + <EditText + android:id="@+id/create_key_passphrase" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:imeOptions="actionNext" + android:inputType="textPassword" + android:hint="@string/label_passphrase" + android:ems="10" + android:layout_gravity="center_horizontal" /> + + <org.sufficientlysecure.keychain.ui.widget.passwordstrengthindicator.PasswordStrengthBarView + android:id="@+id/create_key_passphrase_strength" + android:layout_width="48dp" + android:layout_height="8dp" + android:layout_gravity="end|center_vertical" + custom:strength="medium" + custom:showGuides="false" + custom:color_fail="@color/android_red_light" + custom:color_weak="@color/android_orange_light" + custom:color_strong="@color/android_green_light"/> + + </FrameLayout> <EditText android:id="@+id/create_key_passphrase_again" |