Updated NewEpisodesFragment and FavoriteEpisodesFragment files

This commit is contained in:
Jatin Kumar 2019-03-27 04:55:50 -04:00
parent bdf7bf6844
commit cabf6fee7b
2 changed files with 7 additions and 14 deletions

View File

@ -31,9 +31,6 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment {
private static final String PREF_NAME = "PrefFavoriteEpisodesFragment";
private TextView tvHeader;
private TextView tvEmpty;
@Override
protected boolean showOnlyNewEpisodes() { return true; }
@ -54,10 +51,9 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
R.layout.all_episodes_fragment);
tvHeader = root.findViewById(R.id.emptyHeader);
tvHeader.setText(R.string.no_fav_episodes_head_label);
tvEmpty = root.findViewById(R.id.empty);
tvEmpty.setText(R.string.no_fav_episodes_label);
((TextView)root.findViewById(R.id.emptyHeader)).setText(R.string.no_fav_episodes_head_label);
((TextView)root.findViewById(R.id.empty)).setText(R.string.no_fav_episodes_label);
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {

View File

@ -29,9 +29,7 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
public static final String TAG = "NewEpisodesFragment";
private static final String PREF_NAME = "PrefNewEpisodesFragment";
private TextView tvHeader;
private TextView tvEmpty;
@Override
protected boolean showOnlyNewEpisodes() { return true; }
@ -52,10 +50,9 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
R.layout.all_episodes_fragment);
tvHeader = root.findViewById(R.id.emptyHeader);
tvHeader.setText(R.string.no_new_episodes_head_label);
tvEmpty = root.findViewById(R.id.empty);
tvEmpty.setText(R.string.no_new_episodes_label);
((TextView)root.findViewById(R.id.emptyHeader)).setText(R.string.no_new_episodes_head_label);
((TextView)root.findViewById(R.id.empty)).setText(R.string.no_new_episodes_label);
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {