aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r--OpenKeychain/src/main/res/layout/decrypt_files_fragment.xml149
-rw-r--r--OpenKeychain/src/main/res/layout/decrypt_files_input_fragment.xml83
-rw-r--r--OpenKeychain/src/main/res/layout/decrypt_files_list_fragment.xml50
-rw-r--r--OpenKeychain/src/main/res/layout/decrypt_list_entry.xml248
-rw-r--r--OpenKeychain/src/main/res/menu/decrypt_item_context_menu.xml22
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml2
6 files changed, 405 insertions, 149 deletions
diff --git a/OpenKeychain/src/main/res/layout/decrypt_files_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_files_fragment.xml
deleted file mode 100644
index 22ee7e09f..000000000
--- a/OpenKeychain/src/main/res/layout/decrypt_files_fragment.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-<?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">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <ScrollView
- android:fillViewport="true"
- android:paddingTop="8dp"
- android:layout_width="match_parent"
- android:scrollbars="vertical"
- android:layout_height="0dp"
- android:layout_weight="1">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <View
- android:id="@+id/status_divider"
- android:layout_height="1dip"
- android:layout_width="match_parent"
- android:background="?android:attr/listDivider" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingTop="4dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
- android:orientation="horizontal"
-
- android:id="@+id/decrypt_files_browse"
- android:clickable="true"
- android:background="?android:selectableItemBackground">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/label_file_colon"
- android:gravity="center_vertical" />
-
- <TextView
- android:id="@+id/decrypt_files_filename"
- android:paddingLeft="8dp"
- android:paddingRight="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:hint="@string/filemanager_title_open"
- android:drawableRight="@drawable/ic_folder_grey_24dp"
- android:drawablePadding="8dp"
- android:gravity="center_vertical" />
- </LinearLayout>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="?android:attr/listDivider"
- android:layout_marginBottom="8dp" />
-
- <CheckBox
- android:id="@+id/decrypt_files_delete_after_decryption"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/label_delete_after_decryption" />
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
- android:id="@+id/decrypt_files_action_decrypt"
- android:paddingLeft="8dp"
- android:paddingRight="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:text="@string/btn_decrypt_verify_file"
- android:clickable="true"
- android:background="?android:selectableItemBackground"
- android:drawableRight="@drawable/ic_save_grey_24dp"
- android:drawablePadding="8dp"
- android:gravity="center_vertical"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="?android:attr/listDivider"
- android:layout_above="@+id/decrypt_files_action_decrypt" />
-
- </RelativeLayout>
- </LinearLayout>
- </LinearLayout>
- </ScrollView>
- </LinearLayout>
-
- <!-- TODO: Use this layout later to hide file list -->
- <LinearLayout
- android:visibility="gone"
- android:id="@+id/decrypt_content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"></LinearLayout>
-
- <LinearLayout
- android:visibility="gone"
- android:id="@+id/decrypt_error_overlay"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:gravity="center_vertical">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/decrypt_invalid_text"
- android:padding="16dp"
- android:layout_gravity="center"
- android:textColor="@color/android_red_light" />
-
- <Button
- android:id="@+id/decrypt_error_overlay_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/button_edgy"
- android:textColor="@color/android_red_light"
- android:text="@string/decrypt_invalid_button"
- android:layout_gravity="center_horizontal" />
- </LinearLayout>
-</LinearLayout> \ No newline at end of file
diff --git a/OpenKeychain/src/main/res/layout/decrypt_files_input_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_files_input_fragment.xml
new file mode 100644
index 000000000..b7e70ce10
--- /dev/null
+++ b/OpenKeychain/src/main/res/layout/decrypt_files_input_fragment.xml
@@ -0,0 +1,83 @@
+<?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:paddingTop="4dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:orientation="vertical">
+
+ <View
+ android:id="@+id/status_divider"
+ android:layout_height="1dip"
+ android:layout_width="match_parent"
+ android:background="?android:attr/listDivider" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/listPreferredItemHeight"
+ android:orientation="horizontal"
+ android:id="@+id/decrypt_files_browse"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingLeft="4dp"
+ android:paddingRight="4dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/label_file_colon"
+ android:gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/decrypt_files_filename"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:hint="@string/filemanager_title_open"
+ android:drawableRight="@drawable/ic_folder_grey_24dp"
+ android:drawablePadding="8dp"
+ android:gravity="center_vertical" />
+
+ </LinearLayout>
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="?android:attr/listDivider"
+ android:layout_marginBottom="8dp" />
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/decrypt_files_action_decrypt"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:text="@string/btn_decrypt_verify_file"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground"
+ android:drawableRight="@drawable/ic_save_grey_24dp"
+ android:drawablePadding="8dp"
+ android:gravity="center_vertical"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="?android:attr/listDivider"
+ android:layout_above="@+id/decrypt_files_action_decrypt" />
+
+ </RelativeLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/OpenKeychain/src/main/res/layout/decrypt_files_list_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_files_list_fragment.xml
new file mode 100644
index 000000000..8cee4e77a
--- /dev/null
+++ b/OpenKeychain/src/main/res/layout/decrypt_files_list_fragment.xml
@@ -0,0 +1,50 @@
+<?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">
+
+ <LinearLayout
+ android:id="@+id/decrypt_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/decrypted_files_list"
+ android:paddingTop="16dp"
+ android:scrollbars="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:visibility="gone"
+ android:id="@+id/decrypt_error_overlay"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center_vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/decrypt_invalid_text"
+ android:padding="16dp"
+ android:layout_gravity="center"
+ android:textColor="@color/android_red_light" />
+
+ <Button
+ android:id="@+id/decrypt_error_overlay_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/button_edgy"
+ android:textColor="@color/android_red_light"
+ android:text="@string/decrypt_invalid_button"
+ android:layout_gravity="center_horizontal" />
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml b/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml
new file mode 100644
index 000000000..862258152
--- /dev/null
+++ b/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.CardView
+ 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:id="@+id/card_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="4dp"
+ custom:cardBackgroundColor="@android:color/white"
+ custom:cardElevation="2dp"
+ custom:cardUseCompatPadding="true"
+ custom:cardCornerRadius="4dp"
+ >
+
+ <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp"
+ android:paddingRight="8dp"
+ android:paddingLeft="8dp"
+ android:inAnimation="@anim/fade_in"
+ android:outAnimation="@anim/fade_out"
+ android:id="@+id/view_animator"
+ custom:initialView="1"
+ >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:orientation="vertical"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp">
+
+ <ProgressBar
+ android:id="@+id/progress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:indeterminate="false"
+ style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+ android:progress="40"
+ android:layout_gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/progress_msg"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text=""
+ tools:text="Progress Message"
+ android:layout_gravity="center_vertical" />
+
+ </LinearLayout>
+ <!-- -->
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:paddingLeft="4dp"
+ tools:ignore="UseCompoundDrawables">
+
+ <ImageView
+ android:id="@+id/result_encryption_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/status_lock_open_24dp"
+ android:layout_gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/result_encryption_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginLeft="8dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:text=""
+ tools:text="Encryption status text" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:paddingLeft="4dp"
+ tools:ignore="UseCompoundDrawables">
+
+ <ImageView
+ android:id="@+id/result_signature_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/status_signature_unverified_cutout_24dp"
+ android:layout_gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/result_signature_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginLeft="8dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:text=""
+ tools:text="Signature status text" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/result_signature_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingRight="4dp"
+ android:paddingLeft="4dp"
+ android:gravity="center_vertical"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/result_signature_name"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text=""
+ tools:text="Alice" />
+
+ <TextView
+ android:id="@+id/result_signature_email"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:text=""
+ tools:text="alice@example.com" />
+
+ </LinearLayout>
+
+ <View
+ android:layout_width="1dip"
+ android:layout_height="match_parent"
+ android:gravity="right"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:background="?android:attr/listDivider" />
+
+ <TextView
+ android:id="@+id/result_signature_action"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:drawableRight="@drawable/ic_vpn_key_grey_24dp"
+ android:drawablePadding="8dp"
+ android:gravity="center_vertical"
+ android:text=""
+ tools:text="Show"
+ />
+
+ </LinearLayout>
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ tools:layout_height="2dip"
+ android:background="?android:attr/listDivider" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/file"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground"
+ >
+
+ <ImageView
+ android:id="@+id/thumbnail"
+ android:layout_gravity="center_vertical"
+ android:layout_width="36dp"
+ android:layout_height="36dp"
+ android:scaleType="center"
+ android:padding="6dp"
+ android:src="@drawable/ic_doc_generic_am" />
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+id/filename"
+ android:maxLines="1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:ellipsize="end"
+ android:text=""
+ tools:text="filename.jpg" />
+
+ <TextView
+ android:id="@+id/filesize"
+ android:maxLines="1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorTertiary"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textSize="12sp"
+ android:ellipsize="end"
+ android:text=""
+ tools:text="14kb" />
+
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/context_menu"
+ android:scaleType="center"
+ android:layout_width="36dip"
+ android:layout_height="48dip"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground"
+ android:src="@drawable/abc_ic_menu_moreoverflow_mtrl_alpha" />
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+ </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>
+
+</android.support.v7.widget.CardView> \ No newline at end of file
diff --git a/OpenKeychain/src/main/res/menu/decrypt_item_context_menu.xml b/OpenKeychain/src/main/res/menu/decrypt_item_context_menu.xml
new file mode 100644
index 000000000..e18bdf8e4
--- /dev/null
+++ b/OpenKeychain/src/main/res/menu/decrypt_item_context_menu.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item
+ android:id="@+id/view_log"
+ android:title="@string/view_log"
+ android:icon="@drawable/ic_view_list_grey_24dp"
+ />
+
+ <item
+ android:id="@+id/decrypt_save"
+ android:title="@string/btn_save"
+ android:icon="@drawable/ic_action_encrypt_file_24dp"
+ />
+
+ <item
+ android:id="@+id/decrypt_delete"
+ android:title="@string/btn_delete_original"
+ android:icon="@drawable/ic_delete_grey_24dp"
+ />
+
+</menu> \ No newline at end of file
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index e8d1f1e70..ae131e029 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -1323,6 +1323,8 @@
<string name="error_nfc_header">"NFC: Card reported invalid %s byte"</string>
<string name="error_pin_nodefault">Default PIN was rejected!</string>
<string name="error_bluetooth_file">Error creating temporary file. Bluetooth sharing will fail.</string>
+ <string name="btn_delete_original">Delete original file</string>
+
<string name="snack_encrypt_filenames_on">"Filenames <b>are</b> encrypted."</string>
<string name="snack_encrypt_filenames_off">"Filenames <b>are not</b> encrypted."</string>
<string name="snack_armor_on">"Output encoded as Text."</string>