[Android] Hide append option for videos before HoneyComb

Geoffrey Métais git at videolan.org
Thu Mar 24 13:45:28 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 24 13:31:21 2016 +0100| [15663be2397af6481ea4320384ae99c00b417814] | committer: Geoffrey Métais

Hide append option for videos before HoneyComb

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

 .../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java      | 7 ++++---
 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java  | 4 +++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 920fd79..6034664 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -440,9 +440,10 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
             }
         } else {
             inflater.inflate(R.menu.directory_view_file, menu);
-            menu.findItem(R.id.directory_view_play_all).setVisible(
-                    mw.getType() == MediaWrapper.TYPE_AUDIO ||
-                    (mw.getType() == MediaWrapper.TYPE_VIDEO && AndroidUtil.isHoneycombOrLater()));
+            boolean canPlayInList =  mw.getType() == MediaWrapper.TYPE_AUDIO ||
+                    (mw.getType() == MediaWrapper.TYPE_VIDEO && AndroidUtil.isHoneycombOrLater());
+            menu.findItem(R.id.directory_view_play_all).setVisible(canPlayInList);
+            menu.findItem(R.id.directory_view_append).setVisible(canPlayInList);
             menu.findItem(R.id.directory_view_delete).setVisible(canWrite);
             menu.findItem(R.id.directory_view_info).setVisible(type == MediaWrapper.TYPE_VIDEO || type == MediaWrapper.TYPE_AUDIO);
             menu.findItem(R.id.directory_view_play_audio).setVisible(type != MediaWrapper.TYPE_AUDIO);
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index cb2abfa..0e4fed0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -360,8 +360,10 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
         menu.findItem(R.id.video_list_info).setVisible(hasInfo);
         menu.findItem(R.id.video_list_delete).setVisible(
                 FileUtils.canWrite(mediaWrapper.getLocation()));
-        if (!AndroidUtil.isHoneycombOrLater())
+        if (!AndroidUtil.isHoneycombOrLater()) {
             menu.findItem(R.id.video_list_play_all).setVisible(false);
+            menu.findItem(R.id.video_list_append).setVisible(false);
+        }
     }
 
     @Override



More information about the Android mailing list