[Android] Remove tracks & subs from menu

Geoffrey Métais git at videolan.org
Fri Dec 19 13:36:46 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 19 13:36:19 2014 +0100| [0fae0a4b2c058a1690c975fe0940efbc9dbe0298] | committer: Jean-Baptiste Kempf

Remove tracks & subs from menu

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0fae0a4b2c058a1690c975fe0940efbc9dbe0298
---

 vlc-android/res/menu-v15/video_player.xml             |   15 ---------------
 vlc-android/res/menu/video_player.xml                 |    4 ----
 .../videolan/vlc/gui/video/VideoPlayerActivity.java   |   17 +----------------
 3 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/vlc-android/res/menu-v15/video_player.xml b/vlc-android/res/menu-v15/video_player.xml
deleted file mode 100644
index 12e69c8..0000000
--- a/vlc-android/res/menu-v15/video_player.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:id="@+id/pl_menu_audiotrack"
-        android:icon="@drawable/ic_audio_circle"
-        android:title="@string/track_audio" />
-    <item
-        android:id="@+id/pl_menu_subtitle"
-        android:icon="@drawable/ic_subtitle_circle"
-        android:title="@string/subtitles" />
-    <item
-        android:id="@+id/pl_menu_nav"
-        android:icon="@drawable/ic_navmenu_circle"
-        android:title="@string/navmenu" />
-</menu>
diff --git a/vlc-android/res/menu/video_player.xml b/vlc-android/res/menu/video_player.xml
index 33ebeb8..c02c740 100644
--- a/vlc-android/res/menu/video_player.xml
+++ b/vlc-android/res/menu/video_player.xml
@@ -4,8 +4,4 @@
         android:id="@+id/pl_menu_nav"
         android:icon="@drawable/ic_navmenu_circle"
         android:title="@string/navmenu" />
-    <item
-        android:id="@+id/pl_menu_adv"
-        android:icon="@drawable/ic_more"
-        android:title="@string/advanced" />
 </menu>
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 f763ee1..5bd3492 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -447,16 +447,7 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
     }
 
     public boolean onPrepareOptionsMenu(Menu menu){
-        MenuItem item;
-        item = menu.findItem(R.id.pl_menu_subtitle);
-        item.setVisible(mLibVLC.getSpuTracksCount() > 0);
-        MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
-
-        item = menu.findItem(R.id.pl_menu_audiotrack);
-        item.setVisible(mLibVLC.getAudioTracksCount() > 2);
-        MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
-
-        item = menu.findItem(R.id.pl_menu_nav);
+        MenuItem item = menu.findItem(R.id.pl_menu_nav);
         item.setVisible(mLibVLC.getChapterCountForTitle(0) > 1 && mLibVLC.getTitleCount() > 1 && mLibVLC.getTitle() != 0);
         MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
 
@@ -465,12 +456,6 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
 
     public boolean onOptionsItemSelected(MenuItem item){
         switch (item.getItemId()) {
-            case R.id.pl_menu_subtitle:
-                selectSubtitles();
-                return true;
-            case R.id.pl_menu_audiotrack:
-                selectAudioTrack();
-                return true;
             case R.id.pl_menu_nav:
                 showNavMenu();
                 return true;



More information about the Android mailing list