|
|
@ -22,7 +22,7 @@ class ReaderSettingsSheet(
|
|
|
|
init {
|
|
|
|
init {
|
|
|
|
val sheetBehavior = BottomSheetBehavior.from(binding.root.parent as ViewGroup)
|
|
|
|
val sheetBehavior = BottomSheetBehavior.from(binding.root.parent as ViewGroup)
|
|
|
|
sheetBehavior.isFitToContents = false
|
|
|
|
sheetBehavior.isFitToContents = false
|
|
|
|
sheetBehavior.halfExpandedRatio = 0.5f
|
|
|
|
sheetBehavior.halfExpandedRatio = 0.25f
|
|
|
|
|
|
|
|
|
|
|
|
val filterTabIndex = getTabViews().indexOf(colorFilterSettings)
|
|
|
|
val filterTabIndex = getTabViews().indexOf(colorFilterSettings)
|
|
|
|
binding.tabs.addOnTabSelectedListener(object : SimpleTabSelectedListener() {
|
|
|
|
binding.tabs.addOnTabSelectedListener(object : SimpleTabSelectedListener() {
|
|
|
@ -36,11 +36,6 @@ class ReaderSettingsSheet(
|
|
|
|
if (activity.menuVisible != !isFilterTab) {
|
|
|
|
if (activity.menuVisible != !isFilterTab) {
|
|
|
|
activity.setMenuVisibility(!isFilterTab)
|
|
|
|
activity.setMenuVisibility(!isFilterTab)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Partially collapse the sheet for better preview
|
|
|
|
|
|
|
|
if (isFilterTab) {
|
|
|
|
|
|
|
|
sheetBehavior.state = BottomSheetBehavior.STATE_HALF_EXPANDED
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|