diff options
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r-- | OpenKeychain/src/main/res/anim/fade_in_delayed.xml | 8 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/anim/fade_out_delayed.xml | 8 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/layout/backup_activity.xml | 26 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/layout/backup_code_entry_fragment.xml | 329 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/layout/drawer_backup_fragment.xml (renamed from OpenKeychain/src/main/res/layout/backup_fragment.xml) | 0 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/strings.xml | 6 |
6 files changed, 372 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/res/anim/fade_in_delayed.xml b/OpenKeychain/src/main/res/anim/fade_in_delayed.xml new file mode 100644 index 000000000..3f2887b5e --- /dev/null +++ b/OpenKeychain/src/main/res/anim/fade_in_delayed.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@android:anim/bounce_interpolator" + android:duration="700" + android:startOffset="400" + /> +</set> diff --git a/OpenKeychain/src/main/res/anim/fade_out_delayed.xml b/OpenKeychain/src/main/res/anim/fade_out_delayed.xml new file mode 100644 index 000000000..a895bdedd --- /dev/null +++ b/OpenKeychain/src/main/res/anim/fade_out_delayed.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@android:anim/accelerate_interpolator" + android:duration="300" + android:startOffset="400" + /> +</set> diff --git a/OpenKeychain/src/main/res/layout/backup_activity.xml b/OpenKeychain/src/main/res/layout/backup_activity.xml new file mode 100644 index 000000000..59ab6cbf2 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/backup_activity.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include + android:id="@+id/toolbar_include" + layout="@layout/toolbar_standalone_white" /> + + <LinearLayout + android:layout_below="@id/toolbar_include" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/notify_area" /> + + <FrameLayout + android:id="@+id/content_frame" + android:layout_width="match_parent" + android:layout_height="match_parent"> + </FrameLayout> + + </LinearLayout> +</RelativeLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/backup_code_entry_fragment.xml b/OpenKeychain/src/main/res/layout/backup_code_entry_fragment.xml new file mode 100644 index 000000000..8454b8d40 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/backup_code_entry_fragment.xml @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:custom="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingTop="50dp"> + + <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_gravity="center_horizontal" + android:id="@+id/title_animator" + android:inAnimation="@anim/fade_in" + android:outAnimation="@anim/fade_out" + custom:initialView="0"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="10dp" + android:layout_gravity="center_horizontal" + android:gravity="center_horizontal" + android:text="The backup will be secured with a backup code. Write it down before you proceed!" + style="?android:textAppearanceMedium" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="10dp" + android:layout_gravity="center_horizontal" + android:gravity="center_horizontal" + android:text="Please enter the backup code:" + style="?android:textAppearanceMedium" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="10dp" + android:layout_gravity="center_horizontal" + android:gravity="center_horizontal" + android:text="Code accepted!" + style="?android:textAppearanceMedium" + /> + + </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator> + + <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_gravity="center_horizontal" + android:id="@+id/code_animator" + android:inAnimation="@anim/fade_in" + android:outAnimation="@anim/fade_out" + android:layout_marginTop="15dp" + android:layout_marginBottom="15dp" + custom:initialView="0"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + > + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_display_1" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + style="@android:style/Widget.EditText" + android:clickable="false" + android:focusable="false" + tools:text="ABCDEF" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_display_2" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + style="@android:style/Widget.EditText" + android:clickable="false" + android:focusable="false" + tools:text="GHIJKL" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_display_3" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + style="@android:style/Widget.EditText" + android:clickable="false" + android:focusable="false" + tools:text="MNOPQR" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_display_4" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:singleLine="true" + style="@android:style/Widget.EditText" + android:clickable="false" + android:focusable="false" + tools:text="STUVWX" + /> + + </LinearLayout> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + > + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_1" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:singleLine="true" + android:inputType="textNoSuggestions|textCapCharacters" + android:hint="ABCDEF" + android:textColorHint="@android:color/transparent" + android:maxLength="6" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_2" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:singleLine="true" + android:inputType="textNoSuggestions|textCapCharacters" + android:hint="ABCDEF" + android:textColorHint="@android:color/transparent" + android:maxLength="6" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_3" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:singleLine="true" + android:inputType="textNoSuggestions|textCapCharacters" + android:hint="ABCDEF" + android:textColorHint="@android:color/transparent" + android:maxLength="6" + /> + <TextView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:text="-" + /> + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:id="@+id/backup_code_4" + android:textStyle="bold" + android:typeface="monospace" + android:textSize="@dimen/abc_text_size_medium_material" + android:singleLine="true" + android:inputType="textNoSuggestions|textCapCharacters" + android:hint="ABCDEF" + android:textColorHint="@android:color/transparent" + android:maxLength="6" + /> + + </LinearLayout> + + </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator> + + <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_gravity="center_horizontal" + android:id="@+id/status_animator" + android:inAnimation="@anim/fade_in_delayed" + android:outAnimation="@anim/fade_out" + custom:initialView="0"> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="10dp" + android:text="Ok, I wrote it down!" + android:padding="12dp" + android:id="@+id/button_backup_input" + style="?android:buttonBarButtonStyle" + /> + + <Space + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + android:text="The backup code you entered is wrong!\nDid you write it down correctly?" + style="?android:textAppearanceMedium" + /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="?android:buttonBarStyle"> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="10dp" + android:padding="12dp" + android:text="Share backup" + android:drawableLeft="@drawable/ic_share_grey_24dp" + android:drawablePadding="8dp" + android:id="@+id/button_backup_share" + style="?android:buttonBarButtonStyle" + /> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="10dp" + android:padding="12dp" + android:text="Save backup" + android:drawableLeft="@drawable/ic_save_grey_24dp" + android:drawablePadding="8dp" + android:id="@+id/button_backup_save" + style="?android:buttonBarButtonStyle" + /> + + </LinearLayout> + + </LinearLayout> + + </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator> + + +</LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/backup_fragment.xml b/OpenKeychain/src/main/res/layout/drawer_backup_fragment.xml index 96fba954b..96fba954b 100644 --- a/OpenKeychain/src/main/res/layout/backup_fragment.xml +++ b/OpenKeychain/src/main/res/layout/drawer_backup_fragment.xml diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index b0e0f5734..360ecb136 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -30,6 +30,7 @@ <string name="title_export_keys">"Backup Keys"</string> <string name="title_key_not_found">"Key Not Found"</string> <string name="title_send_key">"Upload to Keyserver"</string> + <string name="title_backup">"Backup Key"</string> <string name="title_certify_key">"Confirm Key"</string> <string name="title_key_details">"Key Details"</string> <string name="title_help">"Help"</string> @@ -1299,16 +1300,11 @@ <item quantity="one">"Exporting one key"</item> <item quantity="other">"Exporting %d keys"</item> </plurals> - <string name="msg_export_file_name">"Filename: %s"</string> <string name="msg_export_all">"Exporting all keys"</string> <string name="msg_export_public">"Exporting public key %s"</string> <string name="msg_export_upload_public">"Uploading public key %s"</string> <string name="msg_export_secret">"Exporting secret key %s"</string> - <string name="msg_export_error_no_file">"No filename specified!"</string> - <string name="msg_export_error_fopen">"Error opening file!"</string> - <string name="msg_export_error_no_uri">"No URI specified!"</string> <string name="msg_export_error_uri_open">"Error opening URI stream!"</string> - <string name="msg_export_error_storage">"Storage is not ready for writing!"</string> <string name="msg_export_error_db">"Database error!"</string> <string name="msg_export_error_io">"Input/output error!"</string> <string name="msg_export_error_key">"Error preprocessing key data!"</string> |