RecyclerView now used in remote fragments. Changes made to the cursor model. A bit more recursive, but better readability in my opinion.

This commit is contained in:
Tobias Erthal
2016-09-14 14:47:02 +02:00
parent 1fedf5a9eb
commit fabd30f6b1
19 changed files with 1219 additions and 720 deletions

View File

@@ -11,26 +11,16 @@
android:layout_below="@id/toolbar_include"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- focusable and related properties to workaround http://stackoverflow.com/q/16182331-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="beforeDescendants"
android:padding="16dp"
android:orientation="vertical">
android:layout_height="match_parent"
android:padding="8dp">
<TextView
android:id="@+id/api_select_sign_key_list_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="8dp"
android:paddingBottom="3dip"
android:text="@string/api_select_sign_key_text"
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -60,33 +50,7 @@
<FrameLayout
android:id="@+id/api_select_sign_key_list_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/api_select_sign_key_create_key"
android:background="?android:selectableItemBackground"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:text="@string/api_settings_create_key"
android:layout_height="?android:attr/listPreferredItemHeight"
android:drawableLeft="@drawable/ic_key_plus_grey600_24dp"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/api_select_sign_key_create_key"
android:background="?android:selectableItemBackground"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:text="@string/api_settings_create_key"
android:layout_height="?android:attr/listPreferredItemHeight"
android:drawableLeft="@drawable/ic_key_plus_grey600_24dp"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true" />

View File

@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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="?android:attr/listPreferredItemHeight"
android:paddingLeft="4dp"
android:paddingRight="?android:attr/scrollbarSize"
android:singleLine="true">
android:maxLines="1">
<CheckBox
android:id="@+id/selected"
@@ -27,21 +30,21 @@
android:id="@+id/select_key_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Alice"
tools:text="Alice"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/select_key_item_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="alice@example.com"
tools:text="alice@example.com"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/select_key_item_creation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0xBBBBBBBBBBBBBBB"
tools:text="0xBBBBBBBBBBBBBBB"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>

View File

@@ -0,0 +1,52 @@
<?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="?android:attr/listPreferredItemHeight"
android:paddingLeft="4dp"
android:paddingRight="?android:attr/scrollbarSize"
android:maxLines="1">
<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="5dip"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/select_key_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Alice"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/select_key_item_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="alice@example.com"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/select_key_item_creation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="0xBBBBBBBBBBBBBBB"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<ImageView
android:id="@+id/select_key_item_status_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/status_signature_revoked_cutout_24dp"
android:paddingLeft="16dp"
android:paddingRight="16dp" />
</LinearLayout>