From 920ffa8c245c4fb32a4eee274bc554617e90d779 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 28 Mar 2020 17:17:28 -0400 Subject: [PATCH] Add fast scroller to library --- .../tachiyomi/ui/library/LibraryCategoryView.kt | 2 ++ app/src/main/res/layout/library_category.xml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt index 9ab39c7625..b2159bc0d7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt @@ -18,6 +18,7 @@ import eu.kanade.tachiyomi.util.lang.plusAssign import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.inflate import eu.kanade.tachiyomi.widget.AutofitRecyclerView +import kotlinx.android.synthetic.main.library_category.view.fast_scroller import kotlinx.android.synthetic.main.library_category.view.swipe_refresh import rx.subscriptions.CompositeSubscription import uy.kohesive.injekt.injectLazy @@ -81,6 +82,7 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att recycler.setHasFixedSize(true) recycler.adapter = adapter swipe_refresh.addView(recycler) + adapter.fastScroller = fast_scroller recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrollStateChanged(recycler: RecyclerView, newState: Int) { diff --git a/app/src/main/res/layout/library_category.xml b/app/src/main/res/layout/library_category.xml index 4d3fec8ccb..5b33d0401e 100644 --- a/app/src/main/res/layout/library_category.xml +++ b/app/src/main/res/layout/library_category.xml @@ -1,5 +1,7 @@ @@ -8,4 +10,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + +