[Android] Fix DPAD navigation

Geoffrey Métais git at videolan.org
Thu Jan 21 16:59:38 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 21 16:59:16 2016 +0100| [001a8e292f49eb232ad9627c0725bd209138f75f] | committer: Geoffrey Métais

Fix DPAD navigation

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

 vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java  | 1 +
 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
index 37e53b6..1b248dc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -521,6 +521,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
                 mAdapter.setSelection(mAdapter.getSelection() + 1);
                 break;
             case KeyEvent.KEYCODE_ENTER:
+            case KeyEvent.KEYCODE_DPAD_CENTER:
                 onClick(mRecyclerView.getChildAt(mAdapter.getSelection()));
                 break;
         }
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 e56b12a..d34600f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1071,12 +1071,15 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         if (mPlaylist.hasFocus()) {
             switch (keyCode) {
                 case KeyEvent.KEYCODE_DPAD_UP:
+                case KeyEvent.KEYCODE_DPAD_LEFT:
                     mPlaylistAdapter.setCurrentIndex(mPlaylistAdapter.getCurrentIndex() - 1);
                     break;
                 case KeyEvent.KEYCODE_DPAD_DOWN:
+                case KeyEvent.KEYCODE_DPAD_RIGHT:
                     mPlaylistAdapter.setCurrentIndex(mPlaylistAdapter.getCurrentIndex() + 1);
                     break;
                 case KeyEvent.KEYCODE_ENTER:
+                case KeyEvent.KEYCODE_DPAD_CENTER:
                     mService.playIndex(mPlaylistAdapter.getCurrentIndex());
                     break;
             }



More information about the Android mailing list