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

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"