Redesign Import, still some todos and regression bugs

This commit is contained in:
Dominik Schürmann
2014-06-18 00:03:06 +02:00
parent 21e9d0b7b4
commit 8c7a360d6e
34 changed files with 1204 additions and 460 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -3,7 +3,7 @@
android:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
@@ -12,21 +12,38 @@
android:layout_height="wrap_content"
android:orientation="vertical" />
<FrameLayout
android:id="@+id/import_navigation_fragment"
<org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout
android:id="@+id/import_sliding_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
android:layout_height="wrap_content" />
<android.support.v4.view.ViewPager
android:id="@+id/import_pager"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@android:color/white" />
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="?android:attr/listDivider" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="?android:attr/listDivider" />
<FrameLayout
android:id="@+id/import_keys_list_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_weight="0.9" />
android:layout_weight="1"
android:background="@android:color/white" />
<LinearLayout
android:id="@+id/import_footer"
@@ -34,7 +51,8 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
android:paddingRight="16dp"
android:background="@android:color/white">
<View
android:layout_width="match_parent"

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal" >
<com.beardedhen.androidbootstrap.BootstrapButton
android:id="@+id/import_clipboard_button"
android:layout_width="match_parent"
android:layout_height="70dp"
android:text="@string/import_clipboard_button"
bootstrapbutton:bb_icon_left="fa-clipboard"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
</LinearLayout>

View File

@@ -1,21 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<com.beardedhen.androidbootstrap.BootstrapButton
<LinearLayout
android:id="@+id/import_keys_file_browse"
android:paddingLeft="8dp"
android:layout_width="match_parent"
android:layout_height="70dp"
android:text="@string/filemanager_title_open"
android:contentDescription="@string/filemanager_title_open"
bootstrapbutton:bb_icon_left="fa-folder-open"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:orientation="horizontal">
<TextView
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="match_parent"
android:text="@string/filemanager_title_open"
android:layout_weight="1"
android:drawableRight="@drawable/ic_action_collection"
android:drawablePadding="8dp"
android:gravity="center_vertical" />
<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" />
<ImageButton
android:id="@+id/import_clipboard_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_action_paste"
android:layout_gravity="center_vertical"
style="@style/SelectableItem" />
</LinearLayout>
<TextView
android:id="@+id/import_qrcode_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp"
android:visibility="gone" />
<ProgressBar
android:id="@+id/import_qrcode_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:progress="0"
android:visibility="gone" />
</LinearLayout>

View File

@@ -1,16 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal">
<EditText
android:id="@+id/import_keybase_query"
android:layout_marginLeft="8dp"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -22,17 +18,24 @@
android:lines="1"
android:maxLines="1"
android:minLines="1"
android:layout_marginRight="8dp"
android:layout_gravity="center_vertical" />
<com.beardedhen.androidbootstrap.BootstrapButton
<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" />
<ImageButton
android:id="@+id/import_keybase_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:padding="16dp"
android:src="@drawable/ic_action_search"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
bootstrapbutton:bb_icon_left="fa-search"
bootstrapbutton:bb_roundedCorners="true"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
style="@style/SelectableItem" />
</LinearLayout>

View File

@@ -17,9 +17,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:paddingRight="?android:attr/scrollbarSize"
android:singleLine="true">
android:singleLine="true"
android:paddingLeft="8dp"
android:paddingRight="16dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<CheckBox
android:id="@+id/selected"

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal">
<com.beardedhen.androidbootstrap.BootstrapButton
android:id="@+id/import_nfc_button"
android:layout_width="wrap_content"
android:layout_height="70dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:text="@string/import_nfc_help_button"
bootstrapbutton:bb_icon_left="fa-question"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/import_nfc_button"
android:text="@string/import_nfc_text" />
</RelativeLayout>

View File

@@ -1,21 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<com.beardedhen.androidbootstrap.BootstrapButton
<LinearLayout
android:id="@+id/import_qrcode_button"
android:paddingLeft="8dp"
android:layout_width="match_parent"
android:layout_height="70dp"
android:text="@string/import_qr_scan_button"
bootstrapbutton:bb_icon_left="fa-barcode"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:orientation="horizontal">
<TextView
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="match_parent"
android:text="@string/import_qr_code_button"
android:layout_weight="1"
android:drawableRight="@drawable/ic_action_qr_code"
android:drawablePadding="8dp"
android:gravity="center_vertical" />
<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" />
<Button
android:id="@+id/import_nfc_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:text="NFC?"
android:layout_gravity="center_vertical"
style="@style/SelectableItem" />
</LinearLayout>
<TextView
android:id="@+id/import_qrcode_text"

View File

@@ -1,20 +1,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<Spinner
android:id="@+id/import_server_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:layout_height="?android:attr/listPreferredItemHeight"
android:orientation="horizontal">
<EditText
@@ -30,18 +23,63 @@
android:lines="1"
android:maxLines="1"
android:minLines="1"
android:layout_marginRight="8dp"
android:layout_gravity="center_vertical" />
<com.beardedhen.androidbootstrap.BootstrapButton
<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" />
<ImageButton
android:id="@+id/import_server_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:padding="16dp"
android:src="@drawable/ic_action_search"
android:layout_gravity="center_vertical"
style="@style/SelectableItem" />
<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" />
<ImageButton
android:id="@+id/import_server_config_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_action_settings"
android:layout_gravity="center_vertical"
style="@style/SelectableItem" />
</LinearLayout>
<LinearLayout
android:id="@+id/import_server_config"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<Spinner
android:id="@+id/import_server_spinner"
android:layout_marginLeft="8dp"
bootstrapbutton:bb_icon_left="fa-search"
bootstrapbutton:bb_roundedCorners="true"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
android:layout_marginRight="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>

View File

@@ -24,8 +24,7 @@
<LinearLayout
android:id="@+id/view_key_action_fingerprint_share"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:orientation="horizontal">
@@ -63,7 +62,6 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
@@ -90,8 +88,7 @@
<LinearLayout
android:id="@+id/view_key_action_key_share"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:orientation="horizontal">
@@ -135,8 +132,7 @@
<LinearLayout
android:id="@+id/view_key_action_nfc_help"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:orientation="horizontal"

View File

@@ -324,10 +324,8 @@
<string name="progress_verifying_integrity">Integrität wird überprüft…</string>
<string name="progress_deleting_securely">\'%s\' wird sicher gelöscht…</string>
<!--action strings-->
<string name="hint_public_keys">Öffentliche Schlüssel suchen</string>
<string name="hint_secret_keys">Private Schlüssel suchen</string>
<string name="action_share_key_with">Teile Schlüssel über…</string>
<string name="hint_keybase_search">Durchsuche Keybase.io</string>
<!--key bit length selections-->
<string name="key_size_512">512</string>
<string name="key_size_768">768</string>

View File

@@ -75,16 +75,11 @@
<!-- menu -->
<string name="menu_preferences">Settings</string>
<string name="menu_help">Help</string>
<string name="menu_import_from_file">Import from file</string>
<string name="menu_import_from_qr_code">Import from QR Code</string>
<string name="menu_import_from_nfc">Import from NFC</string>
<string name="menu_export_key">Export to file</string>
<string name="menu_delete_key">Delete key</string>
<string name="menu_create_key">Create key</string>
<string name="menu_create_key_expert">Create key (expert)</string>
<string name="menu_search">Search</string>
<string name="menu_import_from_key_server">Keyserver</string>
<string name="menu_import_from_keybase">Import from Keybase.io</string>
<string name="menu_key_server">Keyserver…</string>
<string name="menu_update_key">Update from keyserver</string>
<string name="menu_export_key_to_server">Upload to key server</string>
@@ -229,11 +224,6 @@
<string name="key_creation_weak_rsa_info">Note: generating RSA key with length 1024-bit and less is considered unsafe and it\'s disabled for generating new keys.</string>
<string name="key_not_found">Couldn\'t find key %08X.</string>
<plurals name="keys_found">
<item quantity="one">Found %d key.</item>
<item quantity="other">Found %d keys.</item>
</plurals>
<plurals name="bad_keys_encountered">
<item quantity="one">%d bad secret key ignored. Perhaps you exported with the option\n --export-secret-subkeys\nMake sure you export with\n --export-secret-keys\ninstead.</item>
<item quantity="other">%d bad secret keys ignored. Perhaps you exported with the option\n --export-secret-subkeys\nMake sure you export with\n --export-secret-keys\ninstead.</item>
@@ -278,11 +268,11 @@
<string name="error_only_files_are_supported">Direct binary data without actual file in filesystem is not supported.</string>
<string name="error_jelly_bean_needed">You need Android 4.1 to use Android\'s NFC Beam feature!</string>
<string name="error_nfc_needed">NFC is not available on your device!</string>
<string name="error_nothing_import">Nothing to import!</string>
<string name="error_nothing_import">No keys found!</string>
<string name="error_keyserver_insufficient_query">Key search query too short</string>
<string name="error_searching_keys">Unrecoverable error searching for keys at server</string>
<string name="error_keyserver_too_many_responses">Key search query returned too many candidates; Please refine query</string>
<string name="error_import_file_no_content">File has no content</string>
<string name="error_import_file_no_content">File/Clipboard is empty</string>
<string name="error_generic_report_bug">A generic error occurred, please create a new bug report for OpenKeychain.</string>
<plurals name="error_import_non_pgp_part">
<item quantity="one">part of the loaded file is a valid OpenPGP object but not a OpenPGP key</item>
@@ -339,10 +329,10 @@
<string name="progress_deleting_securely">deleting \'%s\' securely…</string>
<!-- action strings -->
<string name="hint_public_keys">Search Public Keys</string>
<string name="hint_public_keys">Name/Email/Key ID…</string>
<string name="hint_secret_keys">Search Secret Keys</string>
<string name="action_share_key_with">Share Key with…</string>
<string name="hint_keybase_search">Search Keybase.io</string>
<string name="hint_keybase_search">Name/Keybase.io username…</string>
<!-- key bit length selections -->
<string name="key_size_512">512</string>
@@ -372,6 +362,10 @@
<string name="help_about_version">Version:</string>
<!-- Import -->
<string name="import_tab_keyserver">Keyserver</string>
<string name="import_tab_direct">File/Clipboard</string>
<string name="import_tab_qr_code">QR Code/NFC</string>
<string name="import_tab_keybase">Keybase.io</string>
<string name="import_import">Import selected keys</string>
<string name="import_from_clipboard">Import from clipboard</string>
@@ -387,6 +381,7 @@
<string name="import_qr_scan_button">Scan QR Code with \'Barcode Scanner\'</string>
<string name="import_nfc_text">To receive keys via NFC, the device needs to be unlocked.</string>
<string name="import_nfc_help_button">Help</string>
<string name="import_qr_code_button">Scan QR Code…</string>
<string name="import_clipboard_button">Get key from clipboard</string>
<string name="import_keybase_button">Get key from Keybase.io</string>