[Android] Always show/hide controls on single tap

Geoffrey Métais git at videolan.org
Thu Dec 8 12:00:04 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec  8 11:56:55 2016 +0100| [5ceb92618505fb55d48767db723375854106f613] | committer: Geoffrey Métais

Always show/hide controls on single tap

> https://code.videolan.org/videolan/vlc-android/commit/5ceb92618505fb55d48767db723375854106f613
---

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java    | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index a50bbb9..fdff961 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1552,7 +1552,11 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
     @Override
     public boolean onSingleTapConfirmed(MotionEvent e) {
-        return false;
+        if (mShowing)
+            hideOverlay(true);
+        else
+            showOverlay();
+        return true;
     }
 
     @Override
@@ -2122,14 +2126,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             case MotionEvent.ACTION_UP:
                 // Mouse events for the core
                 sendMouseEvent(MotionEvent.ACTION_UP, 0, xTouch, yTouch);
-
-                if (mTouchAction == TOUCH_NONE) {
-                    if (!mShowing) {
-                        showOverlay();
-                    } else {
-                        hideOverlay(true);
-                    }
-                }
                 // Seek
                 if (mTouchAction == TOUCH_SEEK)
                     doSeekTouch(Math.round(delta_y), xgesturesize, true);



More information about the Android mailing list