Updated NewEpisodesFragment and FavoriteEpisodesFragment files
This commit is contained in:
parent
bdf7bf6844
commit
cabf6fee7b
|
@ -31,9 +31,6 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment {
|
||||||
|
|
||||||
private static final String PREF_NAME = "PrefFavoriteEpisodesFragment";
|
private static final String PREF_NAME = "PrefFavoriteEpisodesFragment";
|
||||||
|
|
||||||
private TextView tvHeader;
|
|
||||||
private TextView tvEmpty;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean showOnlyNewEpisodes() { return true; }
|
protected boolean showOnlyNewEpisodes() { return true; }
|
||||||
|
|
||||||
|
@ -54,10 +51,9 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment {
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
|
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
|
||||||
R.layout.all_episodes_fragment);
|
R.layout.all_episodes_fragment);
|
||||||
tvHeader = root.findViewById(R.id.emptyHeader);
|
((TextView)root.findViewById(R.id.emptyHeader)).setText(R.string.no_fav_episodes_head_label);
|
||||||
tvHeader.setText(R.string.no_fav_episodes_head_label);
|
((TextView)root.findViewById(R.id.empty)).setText(R.string.no_fav_episodes_label);
|
||||||
tvEmpty = root.findViewById(R.id.empty);
|
|
||||||
tvEmpty.setText(R.string.no_fav_episodes_label);
|
|
||||||
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
|
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
|
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
|
||||||
|
|
|
@ -29,9 +29,7 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
|
||||||
public static final String TAG = "NewEpisodesFragment";
|
public static final String TAG = "NewEpisodesFragment";
|
||||||
|
|
||||||
private static final String PREF_NAME = "PrefNewEpisodesFragment";
|
private static final String PREF_NAME = "PrefNewEpisodesFragment";
|
||||||
|
|
||||||
private TextView tvHeader;
|
|
||||||
private TextView tvEmpty;
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean showOnlyNewEpisodes() { return true; }
|
protected boolean showOnlyNewEpisodes() { return true; }
|
||||||
|
|
||||||
|
@ -52,10 +50,9 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
|
View root = super.onCreateViewHelper(inflater, container, savedInstanceState,
|
||||||
R.layout.all_episodes_fragment);
|
R.layout.all_episodes_fragment);
|
||||||
tvHeader = root.findViewById(R.id.emptyHeader);
|
((TextView)root.findViewById(R.id.emptyHeader)).setText(R.string.no_new_episodes_head_label);
|
||||||
tvHeader.setText(R.string.no_new_episodes_head_label);
|
((TextView)root.findViewById(R.id.empty)).setText(R.string.no_new_episodes_label);
|
||||||
tvEmpty = root.findViewById(R.id.empty);
|
|
||||||
tvEmpty.setText(R.string.no_new_episodes_label);
|
|
||||||
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
|
ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
|
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
|
||||||
|
|
Loading…
Reference in New Issue