diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 92f4a9f7c..5ed762a66 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -137,6 +137,7 @@ public class ItemFragment extends Fragment { root = (ViewGroup) layout.findViewById(R.id.content_root); txtvPodcast = (TextView) layout.findViewById(R.id.txtvPodcast); + txtvPodcast.setOnClickListener(v -> openPodcast()); txtvTitle = (TextView) layout.findViewById(R.id.txtvTitle); txtvDuration = (TextView) layout.findViewById(R.id.txtvDuration); txtvPublished = (TextView) layout.findViewById(R.id.txtvPublished); @@ -169,6 +170,7 @@ public class ItemFragment extends Fragment { registerForContextMenu(webvDescription); imgvCover = (ImageView) layout.findViewById(R.id.imgvCover); + imgvCover.setOnClickListener(v -> openPodcast()); progbarDownload = (ProgressBar) layout.findViewById(R.id.progbarDownload); progbarLoading = (ProgressBar) layout.findViewById(R.id.progbarLoading); butAction1 = (IconButton) layout.findViewById(R.id.butAction1); @@ -263,12 +265,18 @@ public class ItemFragment extends Fragment { @Override public boolean onOptionsItemSelected(MenuItem menuItem) { - try { - return FeedItemMenuHandler.onMenuItemClicked(getActivity(), menuItem.getItemId(), item); - } catch (DownloadRequestException e) { - e.printStackTrace(); - Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show(); - return true; + switch(menuItem.getItemId()) { + case R.id.open_podcast: + openPodcast(); + return true; + default: + try { + return FeedItemMenuHandler.onMenuItemClicked(getActivity(), menuItem.getItemId(), item); + } catch (DownloadRequestException e) { + e.printStackTrace(); + Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show(); + return true; + } } } @@ -456,6 +464,11 @@ public class ItemFragment extends Fragment { } } + private void openPodcast() { + Fragment fragment = ItemlistFragment.newInstance(item.getFeedId()); + ((MainActivity)getActivity()).loadChildFragment(fragment); + } + public void onEventMainThread(QueueEvent event) { if(event.contains(itemID)) { load(); diff --git a/app/src/main/res/menu/feeditem_options.xml b/app/src/main/res/menu/feeditem_options.xml index 898081486..511758c2e 100644 --- a/app/src/main/res/menu/feeditem_options.xml +++ b/app/src/main/res/menu/feeditem_options.xml @@ -93,4 +93,10 @@ android:title="@string/support_label"> - \ No newline at end of file + + + +