reduce the instant changer width

This commit is contained in:
tibbi 2020-02-17 20:34:23 +01:00
parent 018ec4b0a5
commit 7abdd059eb

View file

@ -120,11 +120,11 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
}
val viewWidth = width
val twentyPercent = viewWidth / 5
val instantWidth = viewWidth / 7
val clickedX = e?.rawX ?: 0f
when {
clickedX <= twentyPercent -> listener?.goToPrevItem()
clickedX >= viewWidth - twentyPercent -> listener?.goToNextItem()
clickedX <= instantWidth -> listener?.goToPrevItem()
clickedX >= viewWidth - instantWidth -> listener?.goToNextItem()
else -> toggleFullscreen()
}
return true