[Android] Add "Play" context menu option for albums
Geoffrey Métais
git at videolan.org
Fri May 15 16:59:24 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 15 16:07:17 2015 +0200| [8b2d5d6e43a33408fd6a7d1f4596d82689619db3] | committer: Geoffrey Métais
Add "Play" context menu option for albums
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8b2d5d6e43a33408fd6a7d1f4596d82689619db3
---
.../src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java | 1 +
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index f3c667c..367f7a4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -204,6 +204,7 @@ public class AudioAlbumsSongsFragment extends Fragment implements SwipeRefreshLa
}
if (!AndroidDevices.isPhone())
menu.setGroupVisible(R.id.phone_only, false);
+ menu.findItem(R.id.audio_list_browser_play).setVisible(true);
}
@Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 2fcfa26..22a4313 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -387,10 +387,8 @@ public class AudioBrowserFragment extends MediaBrowserFragment implements SwipeR
menu.setGroupVisible(R.id.songs_view_only, false);
menu.setGroupVisible(R.id.phone_only, false);
}
- if (pos == MODE_ARTIST || pos == MODE_GENRE) {
- MenuItem play = menu.findItem(R.id.audio_list_browser_play);
- play.setVisible(true);
- }
+ if (pos == MODE_ARTIST || pos == MODE_GENRE || pos == MODE_ALBUM)
+ menu.findItem(R.id.audio_list_browser_play).setVisible(true);
if (pos != MODE_SONG && pos != MODE_PLAYLIST)
menu.findItem(R.id.audio_list_browser_delete).setVisible(false);
if (!AndroidDevices.isPhone())
More information about the Android
mailing list