From 6025b44e5b68669aa481db664d79e01349b8459f Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 8 Jan 2020 21:32:07 -0500 Subject: [PATCH] Add fast scroller to library (#2459) --- .../tachiyomi/ui/library/LibraryCategoryView.kt | 2 ++ app/src/main/res/layout/chapters_controller.xml | 2 -- app/src/main/res/layout/library_category.xml | 13 +++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) 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 bf3859dba..d0208027c 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.inflate import eu.kanade.tachiyomi.util.plusAssign import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.AutofitRecyclerView +import kotlinx.android.synthetic.main.chapters_controller.fast_scroller import kotlinx.android.synthetic.main.library_category.view.* import rx.subscriptions.CompositeSubscription import uy.kohesive.injekt.injectLazy @@ -79,6 +80,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/chapters_controller.xml b/app/src/main/res/layout/chapters_controller.xml index 0a0c3c727..1712d0fda 100644 --- a/app/src/main/res/layout/chapters_controller.xml +++ b/app/src/main/res/layout/chapters_controller.xml @@ -36,8 +36,6 @@ + android:layout_height="match_parent"/> - +