pull/1072/head
gedoor 3 years ago
parent 5170bbe353
commit d8c869d15b
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt

@ -159,11 +159,12 @@ class ReadView(context: Context, attrs: AttributeSet) :
override fun onTouchEvent(event: MotionEvent): Boolean {
callBack.screenOffTimerStart()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val insets = this.rootWindowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.mandatorySystemGestures())
val insets =
this.rootWindowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.mandatorySystemGestures())
val height = activity?.windowManager?.currentWindowMetrics?.bounds?.height()
if (height != null) {
if (event.y > height.minus(insets.bottom)) {
return true;
return true
}
}
}

Loading…
Cancel
Save