[Android] Remove tracks & subs from menu
Geoffrey Métais
git at videolan.org
Tue Dec 16 16:23:58 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 16 14:28:10 2014 +0100| [22a2a3edbad4cf75e2e48166a4beea48181dbb21] | committer: Geoffrey Métais
Remove tracks & subs from menu
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=22a2a3edbad4cf75e2e48166a4beea48181dbb21
---
"qq\033\033\033\033\033\033" | 69 ++++++++++++++++++++
vlc-android/res/menu-v15/video_player.xml | 15 -----
vlc-android/res/menu/video_player.xml | 4 --
.../vlc/gui/video/VideoPlayerActivity.java | 17 +----
4 files changed, 70 insertions(+), 35 deletions(-)
diff --git "a/qq\033\033\033\033\033\033" "b/qq\033\033\033\033\033\033"
new file mode 100644
index 0000000..2bcb85f
--- /dev/null
+++ "b/qq\033\033\033\033\033\033"
@@ -0,0 +1,69 @@
+[1mdiff --git a/vlc-android/res/menu-v15/video_player.xml b/vlc-android/res/menu-v15/video_player.xml[m
+[1mdeleted file mode 100644[m
+[1mindex 12e69c8..0000000[m
+[1m--- a/vlc-android/res/menu-v15/video_player.xml[m
+[1m+++ /dev/null[m
+[36m@@ -1,15 +0,0 @@[m
+[31m-<?xml version="1.0" encoding="utf-8"?>[m
+[31m-<menu xmlns:android="http://schemas.android.com/apk/res/android">[m
+[31m- <item[m
+[31m- android:id="@+id/pl_menu_audiotrack"[m
+[31m- android:icon="@drawable/ic_audio_circle"[m
+[31m- android:title="@string/track_audio" />[m
+[31m- <item[m
+[31m- android:id="@+id/pl_menu_subtitle"[m
+[31m- android:icon="@drawable/ic_subtitle_circle"[m
+[31m- android:title="@string/subtitles" />[m
+[31m- <item[m
+[31m- android:id="@+id/pl_menu_nav"[m
+[31m- android:icon="@drawable/ic_navmenu_circle"[m
+[31m- android:title="@string/navmenu" />[m
+[31m-</menu>[m
+[1mdiff --git a/vlc-android/res/menu/video_player.xml b/vlc-android/res/menu/video_player.xml[m
+[1mindex 33ebeb8..c02c740 100644[m
+[1m--- a/vlc-android/res/menu/video_player.xml[m
+[1m+++ b/vlc-android/res/menu/video_player.xml[m
+[36m@@ -4,8 +4,4 @@[m
+ android:id="@+id/pl_menu_nav"[m
+ android:icon="@drawable/ic_navmenu_circle"[m
+ android:title="@string/navmenu" />[m
+[31m- <item[m
+[31m- android:id="@+id/pl_menu_adv"[m
+[31m- android:icon="@drawable/ic_more"[m
+[31m- android:title="@string/advanced" />[m
+ </menu>[m
+[1mdiff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java[m
+[1mindex 1b5ebf1..5e02118 100644[m
+[1m--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java[m
+[1m+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java[m
+[36m@@ -452,16 +452,7 @@[m [mpublic class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay[m
+ }[m
+ [m
+ public boolean onPrepareOptionsMenu(Menu menu){[m
+[31m- MenuItem item;[m
+[31m- item = menu.findItem(R.id.pl_menu_subtitle);[m
+[31m- item.setVisible(mLibVLC.getSpuTracksCount() > 0);[m
+[31m- MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);[m
+[31m-[m
+[31m- item = menu.findItem(R.id.pl_menu_audiotrack);[m
+[31m- item.setVisible(mLibVLC.getAudioTracksCount() > 2);[m
+[31m- MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);[m
+[31m-[m
+[31m- item = menu.findItem(R.id.pl_menu_nav);[m
+[32m+[m[32m MenuItem item = menu.findItem(R.id.pl_menu_nav);[m
+ item.setVisible(mLibVLC.getChapterCountForTitle(0) > 1 && mLibVLC.getTitleCount() > 1 && mLibVLC.getTitle() != 0);[m
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);[m
+ [m
+[36m@@ -470,12 +461,6 @@[m [mpublic class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay[m
+ [m
+ public boolean onOptionsItemSelected(MenuItem item){[m
+ switch (item.getItemId()) {[m
+[31m- case R.id.pl_menu_subtitle:[m
+[31m- selectSubtitles();[m
+[31m- return true;[m
+[31m- case R.id.pl_menu_audiotrack:[m
+[31m- selectAudioTrack();[m
+[31m- return true;[m
+ case R.id.pl_menu_nav:[m
+ showNavMenu();[m
+ return true;[m
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