use FlexibleAdapter with LiveData in KeyListFragment

This commit is contained in:
Vincent Breitmoser
2018-06-20 00:45:34 +02:00
parent 72f3ed89a6
commit f87209d242
23 changed files with 746 additions and 1778 deletions

View File

@@ -7,6 +7,7 @@
<item>
<selector>
<item android:state_selected="true" android:drawable="@color/pressed_gray"/>
<item android:state_activated="true" android:drawable="@color/selected_gray"/>
</selector>
</item>
</ripple>

View File

@@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -43,18 +43,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="72dp"
android:paddingLeft="16dp"
android:paddingRight="32dp"
android:paddingStart="16dp" />
<com.futuremind.recyclerviewfastscroll.FastScroller
android:id="@+id/fastscroll"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:orientation="vertical"
app:fastscroll__bubbleColor="@color/primary" />
android:paddingBottom="72dp" />
</RelativeLayout>
@@ -149,6 +138,21 @@
</com.getbase.floatingactionbutton.FloatingActionsMenu>
</RelativeLayout>
<eu.davidea.fastscroller.FastScroller
android:id="@+id/fast_scroller"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
app:fastScrollerAutoHideEnabled="true"
app:fastScrollerAutoHideDelayInMillis="1000"
app:fastScrollerBubblePosition="adjacent"
app:fastScrollerBubbleEnabled="true"
app:fastScrollerHandleAlwaysVisible="false"
app:fastScrollerIgnoreTouchesOutsideHandle="false"
tools:visibility="visible" />
</FrameLayout>

View File

@@ -1,16 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:super="http://schemas.android.com/apk/lib-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
super:slm_headerDisplay="sticky|inline"
super:slm_section_sectionManager="linear"
tools:ignore="ResAuto">
android:paddingRight="12dp"
android:paddingLeft="12dp">
<TextView style="@style/SectionHeader"
android:id="@android:id/text1"

View File

@@ -11,6 +11,8 @@
android:descendantFocusability="blocksDescendants"
android:background="@drawable/list_item_ripple"
android:focusable="false"
android:paddingLeft="12dp"
android:paddingRight="12dp"
tools:layout_marginTop="30dp">
<ImageView
@@ -61,34 +63,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/key_list_item_slinger_view"
android:layout_width="wrap_content"
android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
tools:visibility="gone">
<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/key_list_item_slinger_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/ic_repeat_grey_24dp"
android:padding="16dp"
android:background="?android:selectableItemBackground"
android:contentDescription="@string/cd_exchange_keys"/>
</LinearLayout>
<ImageView
android:id="@+id/key_list_item_status_icon"
android:layout_width="wrap_content"