[Android] Play/Pause on DPAD_CENTER press

Geoffrey Métais git at videolan.org
Wed Apr 20 18:11:59 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 20 18:11:35 2016 +0200| [4cb197ed81bdf6b7e59cc1a258e9ee5e9be03a03] | committer: Geoffrey Métais

Play/Pause on DPAD_CENTER press

> https://code.videolan.org/videolan/vlc-android/commit/4cb197ed81bdf6b7e59cc1a258e9ee5e9be03a03
---

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

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 2cbd1f0..c7597d5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1196,6 +1196,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             }
         case KeyEvent.KEYCODE_DPAD_DOWN:
         case KeyEvent.KEYCODE_DPAD_CENTER:
+            if (!mShowing) {
+                doPlayPause();
+                return true;
+            }
         case KeyEvent.KEYCODE_ENTER:
             if (mIsNavMenu)
                 return navigateDvdMenu(keyCode);
@@ -2407,6 +2411,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             play();
             showOverlayTimeout(OVERLAY_TIMEOUT);
         }
+        mPlayPause.requestFocus();
     }
 
     private long getTime() {



More information about the Android mailing list