[Android] Handle Search key to trigger filter/search

Geoffrey Métais git at videolan.org
Wed Dec 7 19:26:41 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec  7 19:26:09 2016 +0100| [6bc422e5ba6b4f95ea0e8bd89c02145f7f9984f7] | committer: Geoffrey Métais

Handle Search key to trigger filter/search

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 5e27c33..1c8603d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -712,6 +712,8 @@ public class MainActivity extends AudioPlayerContainerActivity implements Device
                 (Build.VERSION.SDK_INT <= 16) &&
                 (Build.MANUFACTURER.compareTo("LGE") == 0)) {
             return true;
+        } else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
+            MenuItemCompat.expandActionView(mMenu.findItem(R.id.ml_menu_filter));
         }
         return super.onKeyDown(keyCode, event);
     }



More information about the Android mailing list