reduce the instant changer width
This commit is contained in:
parent
018ec4b0a5
commit
7abdd059eb
1 changed files with 3 additions and 3 deletions
|
@ -120,11 +120,11 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||||
}
|
}
|
||||||
|
|
||||||
val viewWidth = width
|
val viewWidth = width
|
||||||
val twentyPercent = viewWidth / 5
|
val instantWidth = viewWidth / 7
|
||||||
val clickedX = e?.rawX ?: 0f
|
val clickedX = e?.rawX ?: 0f
|
||||||
when {
|
when {
|
||||||
clickedX <= twentyPercent -> listener?.goToPrevItem()
|
clickedX <= instantWidth -> listener?.goToPrevItem()
|
||||||
clickedX >= viewWidth - twentyPercent -> listener?.goToNextItem()
|
clickedX >= viewWidth - instantWidth -> listener?.goToNextItem()
|
||||||
else -> toggleFullscreen()
|
else -> toggleFullscreen()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue