From afd7424305448076b6784d14340b2c9dc72a2644 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 14 Nov 2015 12:26:40 -0800 Subject: Add menu for video podcasts for podcast specific functions --- .../dsub/fragments/SubsonicFragment.java | 14 +++++-- .../menu/select_podcast_episode_video_context.xml | 48 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/menu/select_podcast_episode_video_context.xml (limited to 'app') diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index 2b95af22..33ce0b20 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -228,12 +228,20 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR public void onCreateContextMenuSupport(Menu menu, MenuInflater menuInflater, UpdateView updateView, Object selected) { if(selected instanceof Entry) { Entry entry = (Entry) selected; - if(entry instanceof PodcastEpisode && !entry.isVideo()) { + if(entry instanceof PodcastEpisode) { if(Util.isOffline(context)) { - menuInflater.inflate(R.menu.select_podcast_episode_context_offline, menu); + if(entry.isVideo()) { + menuInflater.inflate(R.menu.select_video_context_offline, menu); + } else { + menuInflater.inflate(R.menu.select_podcast_episode_context_offline, menu); + } } else { - menuInflater.inflate(R.menu.select_podcast_episode_context, menu); + if(entry.isVideo()) { + menuInflater.inflate(R.menu.select_podcast_episode_video_context, menu); + } else { + menuInflater.inflate(R.menu.select_podcast_episode_context, menu); + } if(entry.getBookmark() == null) { menu.removeItem(R.id.bookmark_menu_delete); diff --git a/app/src/main/res/menu/select_podcast_episode_video_context.xml b/app/src/main/res/menu/select_podcast_episode_video_context.xml new file mode 100644 index 00000000..5b06cde7 --- /dev/null +++ b/app/src/main/res/menu/select_podcast_episode_video_context.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3