fix: make bottom to top work properly (#320)
* fix: make bottom to top work properly Fixes navigating to the wrong chapter, despite the UI being correct. Makes bottom to top its own setting that functions as expected, not just top to bottom with a RTL slider bar. * fix: allow inversion to pick sides
This commit is contained in:
parent
47b1940ace
commit
75e90541c9
3 changed files with 57 additions and 28 deletions
|
@ -214,7 +214,8 @@ fun initActivity(a: Activity) {
|
|||
window,
|
||||
window.decorView
|
||||
).hide(WindowInsetsCompat.Type.statusBars())
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && statusBarHeight == 0 && a.resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && statusBarHeight == 0
|
||||
&& a.resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
window.decorView.rootWindowInsets?.displayCutout?.apply {
|
||||
if (boundingRects.size > 0) {
|
||||
statusBarHeight = min(boundingRects[0].width(), boundingRects[0].height())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue