Single tap up/down scrolls up/down on webtoon viewer

Along side L/R tapping
This commit is contained in:
Jay 2019-12-05 21:50:56 -08:00
parent b73ae950ad
commit 7b3556fcba

View File

@ -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()