Single tap up/down scrolls up/down on webtoon viewer
Along side L/R tapping
This commit is contained in:
parent
b73ae950ad
commit
7b3556fcba
@ -89,7 +89,10 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
||||
})
|
||||
recycler.tapListener = { event ->
|
||||
val positionX = event.rawX
|
||||
val positionY = event.rawY
|
||||
when {
|
||||
positionY < recycler.height * 0.25 -> if (config.tappingEnabled) scrollUp()
|
||||
positionY > recycler.height * 0.75 -> if (config.tappingEnabled) scrollDown()
|
||||
positionX < recycler.width * 0.33 -> if (config.tappingEnabled) scrollUp()
|
||||
positionX > recycler.width * 0.66 -> if (config.tappingEnabled) scrollDown()
|
||||
else -> activity.toggleMenu()
|
||||
|
Loading…
Reference in New Issue
Block a user