Add bottom inset to bookmarks screen
This commit is contained in:
@@ -17,6 +17,7 @@ import org.koitharu.kotatsu.base.ui.list.OnListItemClickListener
|
||||
import org.koitharu.kotatsu.base.ui.list.SectionedSelectionController
|
||||
import org.koitharu.kotatsu.base.ui.list.decor.AbstractSelectionItemDecoration
|
||||
import org.koitharu.kotatsu.base.ui.list.decor.SpacingItemDecoration
|
||||
import org.koitharu.kotatsu.base.ui.list.fastscroll.FastScroller
|
||||
import org.koitharu.kotatsu.base.ui.util.ReversibleAction
|
||||
import org.koitharu.kotatsu.bookmarks.data.ids
|
||||
import org.koitharu.kotatsu.bookmarks.domain.Bookmark
|
||||
@@ -26,6 +27,7 @@ import org.koitharu.kotatsu.databinding.FragmentListSimpleBinding
|
||||
import org.koitharu.kotatsu.details.ui.DetailsActivity
|
||||
import org.koitharu.kotatsu.list.ui.adapter.ListStateHolderListener
|
||||
import org.koitharu.kotatsu.list.ui.model.ListModel
|
||||
import org.koitharu.kotatsu.main.ui.AppBarOwner
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.reader.ui.ReaderActivity
|
||||
import org.koitharu.kotatsu.utils.ext.getDisplayMessage
|
||||
@@ -37,7 +39,8 @@ class BookmarksFragment :
|
||||
BaseFragment<FragmentListSimpleBinding>(),
|
||||
ListStateHolderListener,
|
||||
OnListItemClickListener<Bookmark>,
|
||||
SectionedSelectionController.Callback<Manga> {
|
||||
SectionedSelectionController.Callback<Manga>,
|
||||
FastScroller.FastScrollListener {
|
||||
|
||||
@Inject
|
||||
lateinit var coil: ImageLoader
|
||||
@@ -96,6 +99,12 @@ class BookmarksFragment :
|
||||
|
||||
override fun onEmptyActionClick() = Unit
|
||||
|
||||
override fun onFastScrollStart(fastScroller: FastScroller) {
|
||||
(activity as? AppBarOwner)?.appBar?.setExpanded(false, true)
|
||||
}
|
||||
|
||||
override fun onFastScrollStop(fastScroller: FastScroller) = Unit
|
||||
|
||||
override fun onSelectionChanged(controller: SectionedSelectionController<Manga>, count: Int) {
|
||||
binding.recyclerView.invalidateNestedItemDecorations()
|
||||
}
|
||||
|
||||
@@ -5,19 +5,16 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingLeft="@dimen/list_spacing"
|
||||
android:paddingTop="@dimen/grid_spacing_outer"
|
||||
android:paddingRight="@dimen/list_spacing"
|
||||
android:paddingBottom="@dimen/grid_spacing_outer">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.list.fastscroll.FastScrollRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/list_spacing"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_feed" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
Reference in New Issue
Block a user