[Android] Seek with DPAD RIGHT and LEFT

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


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

Seek with DPAD RIGHT and LEFT

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

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java  | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 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 b52bee5..db939e5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1171,10 +1171,18 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         case KeyEvent.KEYCODE_MEDIA_STOP:
             exitOK();
             return true;
-        case KeyEvent.KEYCODE_DPAD_UP:
-        case KeyEvent.KEYCODE_DPAD_DOWN:
         case KeyEvent.KEYCODE_DPAD_LEFT:
+            if (!mShowing) {
+                seekDelta(-10000);
+                return true;
+            }
         case KeyEvent.KEYCODE_DPAD_RIGHT:
+            if (!mShowing) {
+                seekDelta(10000);
+                return true;
+            }
+        case KeyEvent.KEYCODE_DPAD_UP:
+        case KeyEvent.KEYCODE_DPAD_DOWN:
         case KeyEvent.KEYCODE_DPAD_CENTER:
         case KeyEvent.KEYCODE_ENTER:
             if (mIsNavMenu)
@@ -2424,8 +2432,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
         long position = getTime() + delta;
         if (position < 0) position = 0;
-        seek(position);
-        showOverlay();
+            seek(position);
+        showInfo(Strings.millisToString(mService.getTime())+"/"+Strings.millisToString(mService.getLength()), 1000);
     }
 
     private void initSeekButton() {



More information about the Android mailing list