do not trigger the brightness and volume slider so agressively
This commit is contained in:
parent
a1cda024c7
commit
a663b89665
1 changed files with 2 additions and 2 deletions
|
@ -154,7 +154,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
val diffX = mTouchDownX - event.x
|
val diffX = mTouchDownX - event.x
|
||||||
val diffY = mTouchDownY - event.y
|
val diffY = mTouchDownY - event.y
|
||||||
|
|
||||||
if (Math.abs(diffY) > Math.abs(diffX)) {
|
if (Math.abs(diffY) > 20 && Math.abs(diffY) > Math.abs(diffX)) {
|
||||||
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
||||||
percent = Math.min(100, Math.max(-100, percent))
|
percent = Math.min(100, Math.max(-100, percent))
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
val diffX = mTouchDownX - event.x
|
val diffX = mTouchDownX - event.x
|
||||||
val diffY = mTouchDownY - event.y
|
val diffY = mTouchDownY - event.y
|
||||||
|
|
||||||
if (Math.abs(diffY) > Math.abs(diffX)) {
|
if (Math.abs(diffY) > 20 && Math.abs(diffY) > Math.abs(diffX)) {
|
||||||
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
||||||
percent = Math.min(100, Math.max(-100, percent))
|
percent = Math.min(100, Math.max(-100, percent))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue