diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/fast_scroller_bubble.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/drawable/fast_scroller_handle.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/layout/abstract_recycler_fragment.xml | 19 | ||||
-rw-r--r-- | app/src/main/res/layout/fast_scroller.xml | 25 |
4 files changed, 82 insertions, 4 deletions
diff --git a/app/src/main/res/drawable/fast_scroller_bubble.xml b/app/src/main/res/drawable/fast_scroller_bubble.xml new file mode 100644 index 00000000..02dfee5b --- /dev/null +++ b/app/src/main/res/drawable/fast_scroller_bubble.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <corners + android:topLeftRadius="44dp" + android:topRightRadius="44dp" + android:bottomLeftRadius="44dp" + android:bottomRightRadius="0px"/> + + <solid android:color="#FF0288D1"/> + + <size + android:height="88dp" + android:width="88dp"/> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/fast_scroller_handle.xml b/app/src/main/res/drawable/fast_scroller_handle.xml new file mode 100644 index 00000000..e1744ceb --- /dev/null +++ b/app/src/main/res/drawable/fast_scroller_handle.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_selected="true"> + <shape android:shape="rectangle"> + <corners android:radius="2dp"/> + + <solid android:color="#FF0288D1"/> + + <size + android:height="32dp" + android:width="4dp"/> + </shape> + </item> + + <item> + <shape android:shape="rectangle"> + <corners android:radius="2dp"/> + + <solid android:color="#FF737373"/> + + <size + android:height="32dp" + android:width="4dp"/> + </shape> + </item> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/layout/abstract_recycler_fragment.xml b/app/src/main/res/layout/abstract_recycler_fragment.xml index 47141450..0e0c87f4 100644 --- a/app/src/main/res/layout/abstract_recycler_fragment.xml +++ b/app/src/main/res/layout/abstract_recycler_fragment.xml @@ -10,12 +10,23 @@ android:layout_height="fill_parent" android:orientation="vertical" > - <android.support.v7.widget.RecyclerView - android:id="@+id/fragment_recycler" + <RelativeLayout android:layout_width="fill_parent" android:layout_height="0dip" - android:layout_weight="1.0" - android:scrollbars="vertical"/> + android:layout_weight="1.0"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/fragment_recycler" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:scrollbars="vertical"/> + + <github.daneren2005.dsub.view.FastScroller + android:id="@+id/fragment_fast_scroller" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:layout_alignParentRight="true"/> + </RelativeLayout> <include layout="@layout/tab_progress" /> </LinearLayout> diff --git a/app/src/main/res/layout/fast_scroller.xml b/app/src/main/res/layout/fast_scroller.xml new file mode 100644 index 00000000..b2e244e3 --- /dev/null +++ b/app/src/main/res/layout/fast_scroller.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="wrap_content" + android:layout_height="match_parent"> + + <TextView + android:id="@+id/fastscroller_bubble" + android:layout_gravity="right|end" + android:gravity="center" + android:textSize="48sp" tools:text="A" + android:layout_width="wrap_content" + android:textColor="#FFffffff" + android:layout_height="wrap_content" + android:background="@drawable/fast_scroller_bubble" + android:visibility="visible"/> + + <ImageView + android:id="@+id/fastscroller_handle" + android:layout_width="wrap_content" + android:layout_marginRight="8dp" + android:layout_marginLeft="8dp" + android:layout_height="wrap_content" + android:src="@drawable/fast_scroller_handle"/> +</merge>
\ No newline at end of file |