From 0172951d4edf5554232b4bf6ab3a0b94fc3c63ff Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Wed, 15 Apr 2015 21:26:08 -0400 Subject: [PATCH] now properly setting the title and changed the icon for 'All Episodes' --- .../de/danoeh/antennapod/adapter/NavListAdapter.java | 4 ++-- .../danoeh/antennapod/fragment/EpisodesFragment.java | 11 ++++++++--- .../antennapod/fragment/NewEpisodesFragment.java | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index 3f3ee6e23..837c7745f 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -46,9 +46,9 @@ public class NavListAdapter extends BaseAdapter { TypedArray ta = context.obtainStyledAttributes(new int[]{ R.attr.stat_playlist, - // TODO: wouldn't be bad to have a different icon for all/new episodes - R.attr.ic_new, R.attr.ic_new, + // TODO: wouldn't be bad to have a different icon for queue and all episodes + R.attr.stat_playlist, R.attr.av_download, R.attr.ic_history, R.attr.content_new}); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java index 4c861dc05..c13fec407 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java @@ -264,12 +264,17 @@ public class EpisodesFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return onCreateViewHelper(inflater, container, savedInstanceState, R.layout.episodes_fragment); + return onCreateViewHelper(inflater, container, savedInstanceState, + R.layout.episodes_fragment, R.string.all_episodes_label); } - protected View onCreateViewHelper(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, int fragmentResource) { + protected View onCreateViewHelper(LayoutInflater inflater, + ViewGroup container, + Bundle savedInstanceState, + int fragmentResource, + int titleString) { super.onCreateView(inflater, container, savedInstanceState); - ((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.new_episodes_label); + ((MainActivity) getActivity()).getSupportActionBar().setTitle(titleString); View root = inflater.inflate(fragmentResource, container, false); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java index 8bb3f10c8..b3dad1914 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java @@ -38,7 +38,8 @@ public class NewEpisodesFragment extends EpisodesFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.new_episodes_fragment); + View root = super.onCreateViewHelper(inflater, container, savedInstanceState, + R.layout.new_episodes_fragment, R.string.new_episodes_label); final DragSortListView listView = (DragSortListView) root.findViewById(android.R.id.list);