Add fast scrolling to SongsFragment
Add a fast-scroll bar to the list of songs in SongsFragment.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".songs.SongsFragment">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
@@ -16,17 +16,38 @@
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_songs"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:title="@string/label_all_songs" />
|
||||
app:title="@string/label_all_songs"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/song_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_fast_scroll"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_toolbar"
|
||||
tools:listitem="@layout/item_song" />
|
||||
|
||||
</LinearLayout>
|
||||
<com.reddit.indicatorfastscroll.FastScrollerView
|
||||
android:id="@+id/song_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/song_toolbar" />
|
||||
|
||||
<com.reddit.indicatorfastscroll.FastScrollerThumbView
|
||||
android:id="@+id/song_fast_scroll_thumb"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_fast_scroll"
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_toolbar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -47,6 +47,14 @@
|
||||
<item name="android:popupBackground">@color/background</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.FastScroll" parent="TextAppearance.AppCompat.Body2">
|
||||
<item name="android:fontFamily">@font/inter_semibold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.ThumbIndicator" parent="TextAppearance.FastScroll">
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Fix to get QueueFragment to not overlap the Status Bar or Navigation Bar [Currently unused but still here]
|
||||
https://stackoverflow.com/a/57790787/14143986
|
||||
|
||||
Reference in New Issue
Block a user