now properly setting the title and changed the icon for 'All Episodes'

This commit is contained in:
Tom Hennen 2015-04-15 21:26:08 -04:00
parent 78768ae9d9
commit 0172951d4e
3 changed files with 12 additions and 6 deletions

View File

@ -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});

View File

@ -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);

View File

@ -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);