improve if readability
improve bottom edge readability
This commit is contained in:
parent
1d92c4474f
commit
a029fc950e
1 changed files with 16 additions and 6 deletions
|
@ -52,9 +52,14 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||
0 else -1
|
||||
)
|
||||
window?.navigationBarColor = Color.TRANSPARENT
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && preferences.readerTheme()
|
||||
.getOrDefault() == 0 && activity.window.decorView.rootWindowInsets.systemWindowInsetRight == 0 && activity.window.decorView.rootWindowInsets.systemWindowInsetLeft == 0
|
||||
) window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
preferences.readerTheme().getOrDefault() == 0 &&
|
||||
activity.window.decorView.rootWindowInsets.systemWindowInsetRight == 0 &&
|
||||
activity.window.decorView.rootWindowInsets.systemWindowInsetLeft == 0
|
||||
) {
|
||||
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||
}
|
||||
|
||||
val height = activity.window.decorView.rootWindowInsets.systemWindowInsetBottom
|
||||
sheetBehavior.peekHeight = 550.dpToPx + height
|
||||
|
||||
|
@ -87,9 +92,14 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||
is WebtoonViewer -> initWebtoonPreferences()
|
||||
}
|
||||
|
||||
setBottomEdge(
|
||||
if (activity.viewer is PagerViewer) page_transitions else webtoon_side_padding, activity
|
||||
)
|
||||
|
||||
|
||||
val bottomEdgeView = when(activity.viewer is PagerViewer){
|
||||
true -> page_transitions
|
||||
false -> webtoon_side_padding
|
||||
}
|
||||
|
||||
setBottomEdge(bottomEdgeView, activity)
|
||||
|
||||
close_button.setOnClickListener {
|
||||
dismiss()
|
||||
|
|
Reference in a new issue