mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 13:51:50 +01:00
Handle bottom insets in FAB controllers too
This commit is contained in:
parent
56e1e3e205
commit
60b2a4ea9d
@ -33,6 +33,7 @@ import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import eu.kanade.tachiyomi.ui.base.controller.FabController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.applyBottomInsetPadding
|
||||
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||
import eu.kanade.tachiyomi.ui.library.ChangeMangaCategoriesDialog
|
||||
import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||
@ -237,12 +238,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
|
||||
if (filterSheet != null) {
|
||||
// Add bottom padding if filter FAB is visible
|
||||
recycler.setPadding(
|
||||
recycler.paddingLeft,
|
||||
recycler.paddingTop,
|
||||
recycler.paddingRight,
|
||||
view.resources.getDimensionPixelOffset(R.dimen.fab_list_padding)
|
||||
)
|
||||
applyBottomInsetPadding(recycler, view.resources.getDimensionPixelOffset(R.dimen.fab_list_padding))
|
||||
recycler.clipToPadding = false
|
||||
|
||||
actionFab?.shrinkOnScroll(recycler)
|
||||
|
@ -19,6 +19,7 @@ import eu.kanade.tachiyomi.data.database.models.Category
|
||||
import eu.kanade.tachiyomi.databinding.CategoriesControllerBinding
|
||||
import eu.kanade.tachiyomi.ui.base.controller.FabController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.applyBottomInsetPadding
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import eu.kanade.tachiyomi.util.view.shrinkOnScroll
|
||||
import kotlinx.android.synthetic.main.main_activity.root_coordinator
|
||||
@ -78,6 +79,9 @@ class CategoryController :
|
||||
*/
|
||||
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
|
||||
binding = CategoriesControllerBinding.inflate(inflater)
|
||||
|
||||
applyBottomInsetPadding(binding.recycler)
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.databinding.DownloadControllerBinding
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.ui.base.controller.FabController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.applyBottomInsetPadding
|
||||
import eu.kanade.tachiyomi.util.view.shrinkOnScroll
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
@ -59,6 +60,9 @@ class DownloadController :
|
||||
|
||||
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
|
||||
binding = DownloadControllerBinding.inflate(inflater)
|
||||
|
||||
applyBottomInsetPadding(binding.recycler)
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@ import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import eu.kanade.tachiyomi.ui.base.controller.FabController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.ToolbarLiftOnScrollController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.applyBottomInsetPadding
|
||||
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||
import eu.kanade.tachiyomi.ui.browse.migration.search.SearchController
|
||||
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController
|
||||
@ -194,6 +195,9 @@ class MangaController :
|
||||
|
||||
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
|
||||
binding = MangaControllerBinding.inflate(inflater)
|
||||
|
||||
applyBottomInsetPadding(binding.recycler)
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user