diff options
Diffstat (limited to 'OpenKeychain/src/main/res')
9 files changed, 132 insertions, 39 deletions
diff --git a/OpenKeychain/src/main/res/layout/encrypt_asymmetric_fragment.xml b/OpenKeychain/src/main/res/layout/encrypt_asymmetric_fragment.xml index ab1bf3d4a..3245fd28b 100644 --- a/OpenKeychain/src/main/res/layout/encrypt_asymmetric_fragment.xml +++ b/OpenKeychain/src/main/res/layout/encrypt_asymmetric_fragment.xml @@ -91,6 +91,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@color/md_black_1000" android:text="@string/label_asymmetric_from" android:paddingRight="8dp"/> diff --git a/OpenKeychain/src/main/res/layout/passphrase_dialog.xml b/OpenKeychain/src/main/res/layout/passphrase_dialog.xml index a2e6af27c..7252effad 100644 --- a/OpenKeychain/src/main/res/layout/passphrase_dialog.xml +++ b/OpenKeychain/src/main/res/layout/passphrase_dialog.xml @@ -1,15 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" + xmlns:tools="http://schemas.android.com/tools" android:paddingTop="16dp" - android:paddingBottom="16dp" android:paddingLeft="24dp" android:paddingRight="24dp" - android:orientation="vertical"> + android:orientation="vertical" + custom:initialView="0"> <LinearLayout - android:id="@+id/input" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> @@ -31,10 +33,33 @@ android:ems="10" android:layout_gravity="center_horizontal" /> + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:gravity="center_vertical" + android:layout_margin="8dp" + android:id="@+id/remember_layout"> + + <!-- paddingBottom for spinner alignment --> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/remember" + android:paddingBottom="1dp" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <org.sufficientlysecure.keychain.ui.widget.CacheTTLSpinner + android:id="@+id/ttl_spinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + </org.sufficientlysecure.keychain.ui.widget.CacheTTLSpinner> + + </LinearLayout> + </LinearLayout> <LinearLayout - android:id="@+id/progress" android:layout_centerInParent="true" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -57,4 +82,4 @@ </LinearLayout> -</RelativeLayout>
\ No newline at end of file +</org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/settings_cache_ttl.xml b/OpenKeychain/src/main/res/layout/settings_cache_ttl.xml new file mode 100644 index 000000000..25ac33c5c --- /dev/null +++ b/OpenKeychain/src/main/res/layout/settings_cache_ttl.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <include + android:id="@+id/toolbar_include" + layout="@layout/toolbar_standalone" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/settings_cache_select_three"/> + + </LinearLayout> + + <View style="@style/Divider"/> + + <FrameLayout + android:id="@+id/settings_cache_ttl_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" /> + +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/settings_cache_ttl_fragment.xml b/OpenKeychain/src/main/res/layout/settings_cache_ttl_fragment.xml new file mode 100644 index 000000000..4a34bc5bc --- /dev/null +++ b/OpenKeychain/src/main/res/layout/settings_cache_ttl_fragment.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> + +<android.support.v7.widget.RecyclerView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/cache_ttl_recycler_view" + android:layout_width="match_parent" + android:layout_height="match_parent" />
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/settings_cache_ttl_item.xml b/OpenKeychain/src/main/res/layout/settings_cache_ttl_item.xml new file mode 100644 index 000000000..c0470288f --- /dev/null +++ b/OpenKeychain/src/main/res/layout/settings_cache_ttl_item.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?listPreferredItemHeight" + android:orientation="horizontal" + android:gravity="center_vertical" + android:background="?selectableItemBackground"> + + <CheckBox + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/ttl_selected" + android:layout_margin="8dp" + /> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:id="@+id/ttl_title" + android:layout_weight="1" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textStyle="bold" + tools:text="One Hour" + /> + +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/simple_item.xml b/OpenKeychain/src/main/res/layout/simple_item.xml new file mode 100644 index 000000000..45033a6e0 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/simple_item.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center_vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/simple_item_text" + android:textAppearance="@android:style/TextAppearance.Medium" + android:padding="8dp" + tools:text="itemtext" /> +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/values/arrays.xml b/OpenKeychain/src/main/res/values/arrays.xml index 393a1e091..584d773b7 100644 --- a/OpenKeychain/src/main/res/values/arrays.xml +++ b/OpenKeychain/src/main/res/values/arrays.xml @@ -1,34 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string-array name="passphrase_cache_ttl_entries" translatable="false"> - <item>@string/choice_15secs</item> - <item>@string/choice_1min</item> - <item>@string/choice_3mins</item> - <item>@string/choice_5mins</item> - <item>@string/choice_10mins</item> - <item>@string/choice_20mins</item> - <item>@string/choice_40mins</item> - <item>@string/choice_1hour</item> - <item>@string/choice_2hours</item> - <item>@string/choice_4hours</item> - <item>@string/choice_8hours</item> - <item>@string/choice_forever</item> - </string-array> - <string-array name="passphrase_cache_ttl_values" translatable="false"> - <item>15</item> - <item>60</item> - <item>180</item> - <item>300</item> - <item>600</item> - <item>1200</item> - <item>2400</item> - <item>3600</item> - <item>7200</item> - <item>14400</item> - <item>28800</item> - <item>-1</item> - </string-array> <string-array name="pref_proxy_type_entries" translatable="false"> <item>@string/pref_proxy_type_choice_http</item> <item>@string/pref_proxy_type_choice_socks</item> diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index afda3c3c3..3c77d82dd 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -18,6 +18,7 @@ <string name="title_preferences">"Settings"</string> <string name="title_api_registered_apps">"Apps"</string> <string name="title_key_server_preference">"OpenPGP keyservers"</string> + <string name="title_cache_ttl_preference">"Customize 'Remember' Choices"</string> <string name="title_change_passphrase">"Change Password"</string> <string name="title_share_fingerprint_with">"Share fingerprint with…"</string> <string name="title_share_key">"Share key with…"</string> @@ -157,7 +158,7 @@ <string name="label_encryption_algorithm">"Encryption algorithm"</string> <string name="label_hash_algorithm">"Hash algorithm"</string> <string name="label_symmetric">"Encrypt with password"</string> - <string name="label_passphrase_cache_ttl">"Remember time"</string> + <string name="label_passphrase_cache_ttl">"Customize 'Remember' Choices"</string> <string name="label_passphrase_cache_subs">"Remember passwords by subkey"</string> <string name="label_message_compression">"Text compression"</string> <string name="label_file_compression">"File compression"</string> @@ -1709,5 +1710,15 @@ <string name="title_edit_identities">"Edit Identities"</string> <string name="title_edit_subkeys">"Edit Subkeys"</string> <string name="btn_search_for_query">"Search for\n'%s'"</string> + <string name="cache_ttl_lock_screen">"until Screen Off"</string> + <string name="cache_ttl_five_minutes">"for Five Minutes"</string> + <string name="cache_ttl_one_hour">"for One Hour"</string> + <string name="cache_ttl_three_hours">"for Three Hours"</string> + <string name="cache_ttl_one_day">"for One Day"</string> + <string name="cache_ttl_three_days">"for Three Days"</string> + <string name="settings_cache_select_three">"Pick up to three."</string> + <string name="settings_cache_ttl_at_least_one">"At least one item must be selected!"</string> + <string name="settings_cache_ttl_max_three">"Can\'t select more than three items!"</string> + <string name="remember">"Remember"</string> </resources> diff --git a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml index 75f293c43..25bdf3a3d 100644 --- a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml +++ b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml @@ -1,8 +1,6 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <org.sufficientlysecure.keychain.ui.widget.IntegerListPreference - android:entries="@array/passphrase_cache_ttl_entries" - android:entryValues="@array/passphrase_cache_ttl_values" - android:key="passphraseCacheTtl" + <PreferenceScreen + android:key="passphraseCacheTtls" android:persistent="false" android:title="@string/label_passphrase_cache_ttl" /> <CheckBoxPreference |