[Android] Show Append action only if VLC is playing
Alexandre Perraud
git at videolan.org
Thu Jan 19 19:02:57 CET 2017
vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Jan 19 17:35:09 2017 +0100| [a01ea4b1772e50d1c4074c320264f80f553e0e83] | committer: Alexandre Perraud
Show Append action only if VLC is playing
> https://code.videolan.org/videolan/vlc-android/commit/a01ea4b1772e50d1c4074c320264f80f553e0e83
---
vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java | 2 +-
vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java | 1 +
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 1 +
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
index 86ec903..1aadc3f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
@@ -173,7 +173,7 @@ public class HistoryFragment extends MediaBrowserFragment implements IRefreshabl
boolean honeyComb = AndroidUtil.isHoneycombOrLater();
menu.findItem(R.id.action_history_info).setVisible(selectionCount == 1);
menu.findItem(R.id.action_history_play).setVisible(honeyComb || selectionCount == 1);
- menu.findItem(R.id.action_history_append).setVisible(honeyComb);
+ menu.findItem(R.id.action_history_append).setVisible(!mService.isPlaying() && honeyComb);
return true;
}
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
index 5bc342b..4a9dd5f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
@@ -55,6 +55,7 @@ public abstract class BaseAudioBrowser extends MediaBrowserFragment implements I
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.action_mode_audio_browser, menu);
+ menu.findItem(R.id.action_mode_audio_append).setVisible(!mService.isPlaying());
if (playlistModeSelected())
menu.findItem(R.id.action_mode_audio_add_playlist).setVisible(false);
return true;
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 237f611..c4e92f1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -645,6 +645,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.action_mode_browser_file, menu);
+ menu.findItem(R.id.action_mode_file_append).setVisible(!mService.isPlaying());
return true;
}
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 ba4b77b..b056ec9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -521,7 +521,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
boolean honeyComb = AndroidUtil.isHoneycombOrLater();
menu.findItem(R.id.action_video_info).setVisible(count == 1);
menu.findItem(R.id.action_video_play).setVisible(honeyComb || count == 1);
- menu.findItem(R.id.action_video_append).setVisible(honeyComb);
+ menu.findItem(R.id.action_video_append).setVisible(!mService.isPlaying() && honeyComb);
return true;
}
More information about the Android
mailing list