diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/MaterialMenuSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/MaterialMenuSheet.kt index 01e2e95eeb..3fbf2d7c67 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/MaterialMenuSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/MaterialMenuSheet.kt @@ -22,7 +22,7 @@ import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener import eu.kanade.tachiyomi.util.view.checkHeightThen import eu.kanade.tachiyomi.util.view.expand import eu.kanade.tachiyomi.util.view.updateLayoutParams -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog import kotlin.math.max import kotlin.math.min @@ -34,7 +34,7 @@ class MaterialMenuSheet( maxHeight: Int? = null, showDivider: Boolean = false, onMenuItemClicked: (MaterialMenuSheet, Int) -> Boolean -) : EdgeToEdgeBottomSheetDialog(activity) { +) : E2EBottomSheetDialog(activity) { override fun createBinding(inflater: LayoutInflater) = BottomMenuSheetBinding.inflate(inflater) private val fastAdapter: FastAdapter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/addtolibrary/SetCategoriesSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/addtolibrary/SetCategoriesSheet.kt index e6e6c50d2a..13377d3114 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/addtolibrary/SetCategoriesSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/addtolibrary/SetCategoriesSheet.kt @@ -24,7 +24,7 @@ import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.view.expand import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updatePaddingRelative -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog import uy.kohesive.injekt.injectLazy import java.util.ArrayList import java.util.Date @@ -38,7 +38,7 @@ class SetCategoriesSheet( var preselected: Array, private val addingToLibrary: Boolean, val onMangaAdded: (() -> Unit) = { } -) : EdgeToEdgeBottomSheetDialog(activity) { +) : E2EBottomSheetDialog(activity) { constructor(activity: Activity, manga: Manga, categories: MutableList, preselected: Array, addingToLibrary: Boolean, onMangaAdded: () -> Unit) : this(activity, listOf(manga), categories, preselected, addingToLibrary, onMangaAdded) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSortBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSortBottomSheet.kt index 74b877852c..6591b95f55 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSortBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSortBottomSheet.kt @@ -12,11 +12,11 @@ import eu.kanade.tachiyomi.databinding.ChapterSortBottomSheetBinding import eu.kanade.tachiyomi.ui.manga.MangaDetailsController import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.view.setBottomEdge -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog import kotlin.math.max class ChaptersSortBottomSheet(controller: MangaDetailsController) : - EdgeToEdgeBottomSheetDialog(controller.activity!!) { + E2EBottomSheetDialog(controller.activity!!) { val activity = controller.activity!! diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt index 810039a553..4d79a756cd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt @@ -19,11 +19,11 @@ import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener import eu.kanade.tachiyomi.util.view.checkHeightThen import eu.kanade.tachiyomi.util.view.updateLayoutParams -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog import timber.log.Timber class TrackingBottomSheet(private val controller: MangaDetailsController) : - EdgeToEdgeBottomSheetDialog(controller.activity!!), + E2EBottomSheetDialog(controller.activity!!), TrackAdapter.OnClickListener, SetTrackStatusDialog.Listener, SetTrackChaptersDialog.Listener, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt index dd3a148c96..94bc6c557b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt @@ -22,13 +22,13 @@ import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.system.toInt import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.setBottomEdge -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog import uy.kohesive.injekt.injectLazy class MigrationBottomSheetDialog( activity: Activity, private val listener: StartMigrationListener -) : EdgeToEdgeBottomSheetDialog(activity) { +) : E2EBottomSheetDialog(activity) { /** * Preferences helper. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt index cb71ee2730..a7c3ed34dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt @@ -10,16 +10,15 @@ import androidx.recyclerview.widget.RecyclerView import com.google.android.material.bottomsheet.BottomSheetBehavior import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible -import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.databinding.SourceFilterSheetBinding import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.view.collapse import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updatePaddingRelative -import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog +import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog class SourceFilterSheet(val activity: Activity) : - EdgeToEdgeBottomSheetDialog(activity) { + E2EBottomSheetDialog(activity) { private var filterChanged = true diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/EdgeToEdgeBottomSheetDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/E2EBottomSheetDialog.kt similarity index 94% rename from app/src/main/java/eu/kanade/tachiyomi/widget/EdgeToEdgeBottomSheetDialog.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/E2EBottomSheetDialog.kt index ae59118fec..ef938b90de 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/EdgeToEdgeBottomSheetDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/E2EBottomSheetDialog.kt @@ -12,8 +12,11 @@ import com.google.android.material.bottomsheet.BottomSheetDialog import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.view.updateLayoutParams +/** + * Edge to Edge BottomSheetDiolag that uses a custom theme and settings to extend pass the nav bar + */ @Suppress("LeakingThis") -abstract class EdgeToEdgeBottomSheetDialog(activity: Activity) : +abstract class E2EBottomSheetDialog(activity: Activity) : BottomSheetDialog(activity, R.style.BottomSheetDialogTheme) { protected val binding: VB diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TabbedBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TabbedBottomSheet.kt index bdff3f8ccb..6b12295b62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TabbedBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TabbedBottomSheet.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.util.view.expand import kotlin.math.max abstract class TabbedBottomSheetDialog(private val activity: Activity) : - EdgeToEdgeBottomSheetDialog(activity) { + E2EBottomSheetDialog(activity) { override fun createBinding(inflater: LayoutInflater) = TabbedBottomSheetBinding.inflate(inflater)