renamed EpisodesFragment to AllEpisodesFragment

This commit is contained in:
Tom Hennen 2015-04-16 19:09:26 -04:00
parent 6d3fe6dd3e
commit b721a5d35f
4 changed files with 10 additions and 15 deletions

View File

@ -34,7 +34,7 @@ import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.util.StorageUtils;
import de.danoeh.antennapod.fragment.AddFeedFragment;
import de.danoeh.antennapod.fragment.EpisodesFragment;
import de.danoeh.antennapod.fragment.AllEpisodesFragment;
import de.danoeh.antennapod.fragment.DownloadsFragment;
import de.danoeh.antennapod.fragment.ExternalPlayerFragment;
import de.danoeh.antennapod.fragment.ItemlistFragment;
@ -214,7 +214,7 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
fragment = new NewEpisodesFragment();
break;
case POS_ALL_EPISODES:
fragment = new EpisodesFragment();
fragment = new AllEpisodesFragment();
break;
case POS_QUEUE:
fragment = new QueueFragment();

View File

@ -7,10 +7,8 @@ import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.SearchView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@ -37,7 +35,6 @@ import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.download.DownloadService;
import de.danoeh.antennapod.core.service.download.Downloader;
import de.danoeh.antennapod.core.storage.DBReader;
@ -45,16 +42,14 @@ import de.danoeh.antennapod.core.storage.DBTasks;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.storage.DownloadRequester;
import de.danoeh.antennapod.core.util.QueueAccess;
import de.danoeh.antennapod.core.util.gui.FeedItemUndoToken;
import de.danoeh.antennapod.core.util.gui.UndoBarController;
import de.danoeh.antennapod.menuhandler.MenuItemUtils;
import de.danoeh.antennapod.menuhandler.NavDrawerActivity;
/**
* Shows unread or recently published episodes
*/
public class EpisodesFragment extends Fragment {
private static final String TAG = "EpisodesFragment";
public class AllEpisodesFragment extends Fragment {
private static final String TAG = "AllEpisodesFragment";
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED |
EventDistributor.DOWNLOAD_QUEUED |
EventDistributor.QUEUE_UPDATE |
@ -62,7 +57,7 @@ public class EpisodesFragment extends Fragment {
EventDistributor.PLAYER_STATUS_UPDATE;
private static final int RECENT_EPISODES_LIMIT = 150;
private static final String DEFAULT_PREF_NAME = "PrefEpisodesFragment";
private static final String DEFAULT_PREF_NAME = "PrefAllEpisodesFragment";
private static final String PREF_KEY_LIST_TOP = "list_top";
private static final String PREF_KEY_LIST_SELECTION = "list_selection";
@ -87,7 +82,7 @@ public class EpisodesFragment extends Fragment {
private boolean isUpdatingFeeds;
public EpisodesFragment() {
public AllEpisodesFragment() {
// by default we show all the episodes
this(false, DEFAULT_PREF_NAME);
}
@ -96,7 +91,7 @@ public class EpisodesFragment extends Fragment {
// The Android docs say to avoid non-default constructors
// but I think this will be OK since it will only be invoked
// from a fragment via a default constructor
protected EpisodesFragment(boolean showOnlyNewEpisodes, String prefName) {
protected AllEpisodesFragment(boolean showOnlyNewEpisodes, String prefName) {
this.showOnlyNewEpisodes = showOnlyNewEpisodes;
this.prefName = prefName;
}
@ -265,7 +260,7 @@ public class EpisodesFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return onCreateViewHelper(inflater, container, savedInstanceState,
R.layout.episodes_fragment, R.string.all_episodes_label);
R.layout.all_episodes_fragment, R.string.all_episodes_label);
}
protected View onCreateViewHelper(LayoutInflater inflater,
@ -331,7 +326,7 @@ public class EpisodesFragment extends Fragment {
@Override
public void onDownloadDataAvailable(List<Downloader> downloaderList) {
EpisodesFragment.this.downloaderList = downloaderList;
AllEpisodesFragment.this.downloaderList = downloaderList;
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}

View File

@ -19,7 +19,7 @@ import de.danoeh.antennapod.core.util.gui.UndoBarController;
* Like 'EpisodesFragment' except that it only shows new episodes and
* supports swiping to mark as read.
*/
public class NewEpisodesFragment extends EpisodesFragment {
public class NewEpisodesFragment extends AllEpisodesFragment {
private static final String TAG = "NewEpisodesFragment";
private static final String PREF_NAME = "PrefNewEpisodesFragment";