From cef5d91eec5ec36e1518c4cfabebe26751c42ff6 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sat, 28 Nov 2020 14:15:31 +0200 Subject: [PATCH] Fast scroll in lists --- app/src/main/res/drawable/list_thumb.xml | 6 + app/src/main/res/drawable/list_track.xml | 6 + app/src/main/res/drawable/thumb.xml | 14 +++ app/src/main/res/drawable/track.xml | 13 +++ .../main/res/layout-w600dp/fragment_list.xml | 23 ++-- app/src/main/res/layout/fragment_chapters.xml | 8 +- app/src/main/res/layout/fragment_list.xml | 107 ++++++++++-------- 7 files changed, 119 insertions(+), 58 deletions(-) create mode 100644 app/src/main/res/drawable/list_thumb.xml create mode 100644 app/src/main/res/drawable/list_track.xml create mode 100644 app/src/main/res/drawable/thumb.xml create mode 100644 app/src/main/res/drawable/track.xml diff --git a/app/src/main/res/drawable/list_thumb.xml b/app/src/main/res/drawable/list_thumb.xml new file mode 100644 index 000000000..06674b69d --- /dev/null +++ b/app/src/main/res/drawable/list_thumb.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/list_track.xml b/app/src/main/res/drawable/list_track.xml new file mode 100644 index 000000000..532264d4e --- /dev/null +++ b/app/src/main/res/drawable/list_track.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/thumb.xml b/app/src/main/res/drawable/thumb.xml new file mode 100644 index 000000000..71e0a8113 --- /dev/null +++ b/app/src/main/res/drawable/thumb.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/track.xml b/app/src/main/res/drawable/track.xml new file mode 100644 index 000000000..ebffeab9b --- /dev/null +++ b/app/src/main/res/drawable/track.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-w600dp/fragment_list.xml b/app/src/main/res/layout-w600dp/fragment_list.xml index 2672a6cd6..c0c281ce0 100644 --- a/app/src/main/res/layout-w600dp/fragment_list.xml +++ b/app/src/main/res/layout-w600dp/fragment_list.xml @@ -3,15 +3,15 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent" - android:animateLayoutChanges="true"> + android:animateLayoutChanges="true" + android:orientation="horizontal"> + android:layout_height="match_parent" + android:layout_weight="1"> @@ -45,8 +50,8 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" - android:textColor="?android:textColorSecondary" android:textAppearance="?android:textAppearanceMedium" + android:textColor="?android:textColorSecondary" tools:text="@tools:sample/lorem[3]" /> @@ -61,21 +66,21 @@ + android:background="?dividerVertical" + android:visibility="gone" /> diff --git a/app/src/main/res/layout/fragment_chapters.xml b/app/src/main/res/layout/fragment_chapters.xml index 98874732e..c4671d8c2 100644 --- a/app/src/main/res/layout/fragment_chapters.xml +++ b/app/src/main/res/layout/fragment_chapters.xml @@ -1,5 +1,6 @@ - diff --git a/app/src/main/res/layout/fragment_list.xml b/app/src/main/res/layout/fragment_list.xml index 30f7d4e5b..51caa6c05 100644 --- a/app/src/main/res/layout/fragment_list.xml +++ b/app/src/main/res/layout/fragment_list.xml @@ -1,72 +1,83 @@ - + android:layout_height="match_parent" + android:orientation="vertical"> - - - + android:layout_height="match_parent"> - + - + - + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" + android:gravity="center_horizontal" + android:orientation="vertical"> - + - + - + - + - \ No newline at end of file + + + + \ No newline at end of file