mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 00:05:08 +01:00
Adding fast scroll to extensions list
This commit is contained in:
parent
8c394a4a7b
commit
aa8195c48f
@ -60,6 +60,7 @@ ExtensionAdapter.OnButtonClickListener,
|
||||
ext_recycler.setHasFixedSize(true)
|
||||
ext_recycler.addItemDecoration(ExtensionDividerItemDecoration(context))
|
||||
ext_recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
|
||||
adapter?.fastScroller = fast_scroller
|
||||
this.controller = controller
|
||||
presenter.onCreate()
|
||||
updateExtTitle()
|
||||
@ -68,8 +69,8 @@ ExtensionAdapter.OnButtonClickListener,
|
||||
val array = context.obtainStyledAttributes(attrsArray)
|
||||
val headerHeight = array.getDimensionPixelSize(0, 0)
|
||||
array.recycle()
|
||||
ext_recycler.doOnApplyWindowInsets { _, windowInsets, _ ->
|
||||
ext_recycler.updateLayoutParams<LayoutParams> {
|
||||
ext_recycler_layout.doOnApplyWindowInsets { v, windowInsets, _ ->
|
||||
v.updateLayoutParams<MarginLayoutParams> {
|
||||
topMargin = windowInsets.systemWindowInsetTop + headerHeight -
|
||||
(sheet_layout.height)
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
||||
android:id="@+id/sheet_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bottom_sheet_rounded_background"
|
||||
android:backgroundTint="?attr/colorPrimaryVariant"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -43,8 +43,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
@ -54,11 +54,24 @@
|
||||
tools:text="Extensions" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/ext_recycler"
|
||||
<FrameLayout
|
||||
android:id="@+id/ext_recycler_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/extension_card_header" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/ext_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/extension_card_header" />
|
||||
|
||||
<eu.kanade.tachiyomi.ui.library.MaterialFastScroll
|
||||
android:id="@+id/fast_scroller"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:fastScrollerBubbleEnabled="false" />
|
||||
|
||||
</FrameLayout>
|
||||
</eu.kanade.tachiyomi.ui.extension.ExtensionBottomSheet>
|
Loading…
Reference in New Issue
Block a user