diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt
index 994faad7a0..11396534d5 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt
@@ -1,11 +1,11 @@
package eu.kanade.tachiyomi.ui.library
import eu.davidea.flexibleadapter.FlexibleAdapter
-import eu.kanade.tachiyomi.data.database.models.Manga
-import androidx.recyclerview.widget.RecyclerView
-import eu.davidea.flexibleadapter.SelectableAdapter
import eu.davidea.flexibleadapter.items.IFlexible
+import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.ui.category.CategoryAdapter
+import java.util.*
+
/**
* Adapter storing a list of manga in a certain category.
@@ -51,4 +51,15 @@ class LibraryCategoryAdapter(view: LibraryCategoryView) :
updateDataSet(mangas.filter { it.filter(s) })
}
+ override fun onCreateBubbleText(position: Int): String {
+ return if (position < scrollableHeaders.size) {
+ "Top"
+ } else if (position >= itemCount - scrollableFooters.size) {
+ "Bottom"
+ } else { // Get and show the first character
+ val iFlexible: IFlexible<*>? = getItem(position)
+ (iFlexible as LibraryItem).manga.title.substring(0, 1).toUpperCase(Locale.US)
+ }
+ }
+
}
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 3f9f4804ad..5abf404a77 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
@@ -86,6 +86,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 d7476939f7..83355885a0 100644
--- a/app/src/main/res/layout/library_category.xml
+++ b/app/src/main/res/layout/library_category.xml
@@ -1,14 +1,22 @@
-
+ android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
+ android:layout_height="match_parent"
+ >
-
+
diff --git a/app/src/main/res/layout/library_controller.xml b/app/src/main/res/layout/library_controller.xml
index e24b4ec9a9..a961400051 100644
--- a/app/src/main/res/layout/library_controller.xml
+++ b/app/src/main/res/layout/library_controller.xml
@@ -1,7 +1,9 @@
+ android:layout_height="match_parent"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
-