library: add fast-scroller

Add a fast-scroller to the library view. This makes long lists of
items such as albums easier to scroll through, but also requires
pre-sorting of artists to make sure that unintended behavior does
not occur. A future commit may improve the sort options here so that
this does not need to occur.
This commit is contained in:
OxygenCobalt
2021-06-19 10:03:35 -06:00
parent 7adfb921fa
commit 5131db5383
4 changed files with 27 additions and 3 deletions
+15 -2
View File
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context=".library.LibraryFragment">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
@@ -13,6 +13,9 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/library_toolbar"
style="@style/Toolbar.Style"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/menu_library"
app:title="@string/label_library" />
@@ -22,7 +25,17 @@
android:layout_height="0dp"
android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/library_toolbar"
tools:listitem="@layout/item_artist" />
</LinearLayout>
<org.oxycblt.auxio.songs.FastScrollView
android:id="@+id/library_fast_scroll"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/library_toolbar" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>