Fixes #3052: Added empty views to the Playback History, Queue, Downloads and Episodes
This commit is contained in:
parent
6662205167
commit
bdf7bf6844
|
@ -19,6 +19,7 @@ import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ public class AllEpisodesFragment extends Fragment {
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
AllEpisodesRecycleAdapter listAdapter;
|
AllEpisodesRecycleAdapter listAdapter;
|
||||||
private ProgressBar progLoading;
|
private ProgressBar progLoading;
|
||||||
|
private LinearLayout layoutEmpty;
|
||||||
|
|
||||||
List<FeedItem> episodes;
|
List<FeedItem> episodes;
|
||||||
private List<Downloader> downloaderList;
|
private List<Downloader> downloaderList;
|
||||||
|
@ -331,6 +333,9 @@ public class AllEpisodesFragment extends Fragment {
|
||||||
onFragmentLoaded();
|
onFragmentLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
layoutEmpty = (LinearLayout) root.findViewById(R.id.llEmpty);
|
||||||
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,6 +347,14 @@ public class AllEpisodesFragment extends Fragment {
|
||||||
listAdapter.setHasStableIds(true);
|
listAdapter.setHasStableIds(true);
|
||||||
recyclerView.setAdapter(listAdapter);
|
recyclerView.setAdapter(listAdapter);
|
||||||
}
|
}
|
||||||
|
if(episodes == null || episodes.size() == 0) {
|
||||||
|
recyclerView.setVisibility(View.GONE);
|
||||||
|
layoutEmpty.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
|
recyclerView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
restoreScrollPosition();
|
restoreScrollPosition();
|
||||||
getActivity().supportInvalidateOptionsMenu();
|
getActivity().supportInvalidateOptionsMenu();
|
||||||
|
@ -473,6 +486,7 @@ public class AllEpisodesFragment extends Fragment {
|
||||||
}
|
}
|
||||||
if (viewsCreated && !itemsLoaded) {
|
if (viewsCreated && !itemsLoaded) {
|
||||||
recyclerView.setVisibility(View.GONE);
|
recyclerView.setVisibility(View.GONE);
|
||||||
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
progLoading.setVisibility(View.VISIBLE);
|
progLoading.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
disposable = Observable.fromCallable(this::loadData)
|
disposable = Observable.fromCallable(this::loadData)
|
||||||
|
|
|
@ -8,7 +8,6 @@ import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -22,6 +21,7 @@ import de.danoeh.antennapod.core.storage.DBReader;
|
||||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||||
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
||||||
import de.danoeh.antennapod.dialog.EpisodesApplyActionFragment;
|
import de.danoeh.antennapod.dialog.EpisodesApplyActionFragment;
|
||||||
|
import de.danoeh.antennapod.view.EmptyViewHandler;
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
@ -108,11 +108,10 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||||
onFragmentLoaded();
|
onFragmentLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
//empty view
|
EmptyViewHandler emptyView = new EmptyViewHandler(getActivity());
|
||||||
View emptyView = getActivity().getLayoutInflater().inflate(R.layout.completed_downloads_empty_view, null);
|
emptyView.setTitle(R.string.no_comp_downloads_head_label);
|
||||||
((ViewGroup)getListView().getParent()).addView(emptyView);
|
emptyView.setMessage(R.string.no_comp_downloads_label);
|
||||||
getListView().setEmptyView(emptyView);
|
emptyView.attachToListView(getListView());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,7 +11,6 @@ import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -25,6 +24,7 @@ import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||||
import de.danoeh.antennapod.core.storage.DBReader;
|
import de.danoeh.antennapod.core.storage.DBReader;
|
||||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||||
|
import de.danoeh.antennapod.view.EmptyViewHandler;
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
@ -77,10 +77,11 @@ public class DownloadLogFragment extends ListFragment {
|
||||||
onFragmentLoaded();
|
onFragmentLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
//empty view
|
EmptyViewHandler emptyView = new EmptyViewHandler(getActivity());
|
||||||
View emptyView = getActivity().getLayoutInflater().inflate(R.layout.download_log_empty_view, null);
|
emptyView.setTitle(R.string.no_log_downloads_head_label);
|
||||||
((ViewGroup)getListView().getParent()).addView(emptyView);
|
emptyView.setMessage(R.string.no_log_downloads_label);
|
||||||
getListView().setEmptyView(emptyView);
|
emptyView.attachToListView(getListView());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onFragmentLoaded() {
|
private void onFragmentLoaded() {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -30,6 +31,9 @@ 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; }
|
||||||
|
|
||||||
|
@ -50,7 +54,10 @@ 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);
|
||||||
|
tvHeader.setText(R.string.no_fav_episodes_head_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) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -29,6 +30,8 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
|
||||||
|
|
||||||
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; }
|
||||||
|
|
||||||
|
@ -49,7 +52,10 @@ 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);
|
||||||
|
tvHeader.setText(R.string.no_new_episodes_head_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) {
|
||||||
|
|
|
@ -10,7 +10,6 @@ import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -30,6 +29,7 @@ import de.danoeh.antennapod.core.storage.DBReader;
|
||||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||||
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
||||||
import de.danoeh.antennapod.core.util.LongList;
|
import de.danoeh.antennapod.core.util.LongList;
|
||||||
|
import de.danoeh.antennapod.view.EmptyViewHandler;
|
||||||
import de.greenrobot.event.EventBus;
|
import de.greenrobot.event.EventBus;
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
|
@ -83,10 +83,11 @@ public class PlaybackHistoryFragment extends ListFragment {
|
||||||
onFragmentLoaded();
|
onFragmentLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
//empty view
|
EmptyViewHandler emptyView = new EmptyViewHandler(getActivity());
|
||||||
View emptyView = getActivity().getLayoutInflater().inflate(R.layout.playback_history_empty_view, null);
|
emptyView.setTitle(R.string.no_history_head_label);
|
||||||
((ViewGroup)getListView().getParent()).addView(emptyView);
|
emptyView.setMessage(R.string.no_history_label);
|
||||||
getListView().setEmptyView(emptyView);
|
emptyView.attachToListView(getListView());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -72,8 +73,7 @@ public class QueueFragment extends Fragment {
|
||||||
private TextView infoBar;
|
private TextView infoBar;
|
||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
private QueueRecyclerAdapter recyclerAdapter;
|
private QueueRecyclerAdapter recyclerAdapter;
|
||||||
private TextView txtvEmpty;
|
private LinearLayout layoutEmpty;
|
||||||
private TextView txtvHeadEmpty;
|
|
||||||
private ProgressBar progLoading;
|
private ProgressBar progLoading;
|
||||||
|
|
||||||
private List<FeedItem> queue;
|
private List<FeedItem> queue;
|
||||||
|
@ -494,11 +494,9 @@ public class QueueFragment extends Fragment {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
itemTouchHelper.attachToRecyclerView(recyclerView);
|
itemTouchHelper.attachToRecyclerView(recyclerView);
|
||||||
|
//empty view
|
||||||
txtvEmpty = root.findViewById(android.R.id.empty);
|
layoutEmpty = (LinearLayout) root.findViewById(R.id.llEmpty);
|
||||||
txtvEmpty.setVisibility(View.GONE);
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
txtvHeadEmpty = root.findViewById(R.id.emptyQueueHeader);
|
|
||||||
txtvHeadEmpty.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
progLoading = root.findViewById(R.id.progLoading);
|
progLoading = root.findViewById(R.id.progLoading);
|
||||||
progLoading.setVisibility(View.VISIBLE);
|
progLoading.setVisibility(View.VISIBLE);
|
||||||
|
@ -516,12 +514,10 @@ public class QueueFragment extends Fragment {
|
||||||
}
|
}
|
||||||
if(queue == null || queue.size() == 0) {
|
if(queue == null || queue.size() == 0) {
|
||||||
recyclerView.setVisibility(View.GONE);
|
recyclerView.setVisibility(View.GONE);
|
||||||
txtvEmpty.setVisibility(View.VISIBLE);
|
layoutEmpty.setVisibility(View.VISIBLE);
|
||||||
txtvHeadEmpty.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
} else {
|
||||||
txtvEmpty.setVisibility(View.GONE);
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
recyclerView.setVisibility(View.VISIBLE);
|
recyclerView.setVisibility(View.VISIBLE);
|
||||||
txtvHeadEmpty.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restoreScrollPosition) {
|
if (restoreScrollPosition) {
|
||||||
|
@ -634,8 +630,7 @@ public class QueueFragment extends Fragment {
|
||||||
}
|
}
|
||||||
if (queue == null) {
|
if (queue == null) {
|
||||||
recyclerView.setVisibility(View.GONE);
|
recyclerView.setVisibility(View.GONE);
|
||||||
txtvEmpty.setVisibility(View.GONE);
|
layoutEmpty.setVisibility(View.GONE);
|
||||||
txtvHeadEmpty.setVisibility(View.GONE);
|
|
||||||
progLoading.setVisibility(View.VISIBLE);
|
progLoading.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
disposable = Observable.fromCallable(DBReader::getQueue)
|
disposable = Observable.fromCallable(DBReader::getQueue)
|
||||||
|
|
|
@ -4,7 +4,6 @@ import android.os.Bundle;
|
||||||
import android.support.v4.app.ListFragment;
|
import android.support.v4.app.ListFragment;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -21,6 +20,7 @@ import de.danoeh.antennapod.core.service.download.Downloader;
|
||||||
import de.danoeh.antennapod.core.storage.DBReader;
|
import de.danoeh.antennapod.core.storage.DBReader;
|
||||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||||
|
import de.danoeh.antennapod.view.EmptyViewHandler;
|
||||||
import de.greenrobot.event.EventBus;
|
import de.greenrobot.event.EventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,10 +46,11 @@ public class RunningDownloadsFragment extends ListFragment {
|
||||||
adapter = new DownloadlistAdapter(getActivity(), itemAccess);
|
adapter = new DownloadlistAdapter(getActivity(), itemAccess);
|
||||||
setListAdapter(adapter);
|
setListAdapter(adapter);
|
||||||
|
|
||||||
//empty view
|
EmptyViewHandler emptyView = new EmptyViewHandler(getActivity());
|
||||||
View emptyView = getActivity().getLayoutInflater().inflate(R.layout.running_downloads_empty_view, null);
|
emptyView.setTitle(R.string.no_run_downloads_head_label);
|
||||||
((ViewGroup)getListView().getParent()).addView(emptyView);
|
emptyView.setMessage(R.string.no_run_downloads_label);
|
||||||
getListView().setEmptyView(emptyView);
|
emptyView.attachToListView(getListView());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
package de.danoeh.antennapod.view;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import de.danoeh.antennapod.R;
|
||||||
|
|
||||||
|
public class EmptyViewHandler extends View {
|
||||||
|
private Activity activity;
|
||||||
|
private int title;
|
||||||
|
private int message;
|
||||||
|
|
||||||
|
public EmptyViewHandler(Context context) {
|
||||||
|
super(context);
|
||||||
|
this.setActivity((Activity) context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(int title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(int message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void attachToListView(ListView listView){
|
||||||
|
|
||||||
|
View emptyView = getActivity().getLayoutInflater().inflate(R.layout.empty_view_layout, null);
|
||||||
|
((ViewGroup) listView.getParent()).addView(emptyView);
|
||||||
|
listView.setEmptyView(emptyView);
|
||||||
|
|
||||||
|
TextView tvTitle = (TextView) emptyView.findViewById(R.id.txtvtitle);
|
||||||
|
tvTitle.setText(title);
|
||||||
|
|
||||||
|
TextView tvMessage = (TextView) emptyView.findViewById(R.id.txtvmessage);
|
||||||
|
tvMessage.setText(message);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Activity getActivity() {
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivity(Activity activity) {
|
||||||
|
this.activity = activity;
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,41 @@
|
||||||
tools:itemCount="13"
|
tools:itemCount="13"
|
||||||
tools:listitem="@layout/new_episodes_listitem" />
|
tools:listitem="@layout/new_episodes_listitem" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llEmpty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/emptyHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/no_all_episodes_head_label"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:textSize="20dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/empty"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/no_all_episodes_label"
|
||||||
|
android:textSize="15dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progLoading"
|
android:id="@+id/progLoading"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:text="@string/no_comp_downloads_head_label"
|
|
||||||
android:textSize="20dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingBottom="10dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:text="@string/no_comp_downloads_label"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:textAlignment="center"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:text="@string/no_log_downloads_head_label"
|
|
||||||
android:textSize="20dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingBottom="10dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:text="@string/no_log_downloads_label"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:textAlignment="center"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -6,20 +6,22 @@
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/txtvtitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:text="@string/no_history_head_label"
|
android:text="empty"
|
||||||
android:textSize="20dp"
|
android:textSize="20dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:paddingBottom="10dp"/>
|
android:paddingBottom="10dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/txtvmessage"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="15dp"
|
android:textSize="15dp"
|
||||||
android:text="@string/no_history_label"
|
android:text="empty"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="15dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp"
|
||||||
android:textAlignment="center"/>
|
android:textAlignment="center"/>
|
|
@ -27,14 +27,21 @@
|
||||||
android:layout_below="@id/divider"
|
android:layout_below="@id/divider"
|
||||||
android:scrollbars="vertical"/>
|
android:scrollbars="vertical"/>
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/emptyQueueHeader"
|
android:id="@+id/llEmpty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/emptyQueueHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/no_items_header_label"
|
android:text="@string/no_items_header_label"
|
||||||
android:paddingBottom="80dp"
|
android:paddingBottom="15dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:textSize="20dp"
|
android:textSize="20dp"
|
||||||
|
@ -42,9 +49,9 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@id/android:empty"
|
android:id="@+id/empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/no_items_label"
|
android:text="@string/no_items_label"
|
||||||
|
@ -53,6 +60,7 @@
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:textAlignment="center"/>
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progLoading"
|
android:id="@+id/progLoading"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:text="@string/no_run_downloads_head_label"
|
|
||||||
android:textSize="20dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingBottom="10dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:text="@string/no_log_downloads_label"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:textAlignment="center"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -327,7 +327,12 @@
|
||||||
<string name="no_log_downloads_label">Download logs will appear here when available.</string>
|
<string name="no_log_downloads_label">Download logs will appear here when available.</string>
|
||||||
<string name="no_history_head_label">No History</string>
|
<string name="no_history_head_label">No History</string>
|
||||||
<string name="no_history_label">After you listen to an episode, it will appear here.</string>
|
<string name="no_history_label">After you listen to an episode, it will appear here.</string>
|
||||||
|
<string name="no_all_episodes_head_label">No Episodes</string>
|
||||||
|
<string name="no_all_episodes_label">When you add a podcast, the episodes will be shown here.</string>
|
||||||
|
<string name="no_new_episodes_head_label">No new episodes</string>
|
||||||
|
<string name="no_new_episodes_label">When new episodes arrive, they will be shown here.</string>
|
||||||
|
<string name="no_fav_episodes_head_label">No favourite episodes</string>
|
||||||
|
<string name="no_fav_episodes_label">You can add episodes to the favourites by long-pressing them.</string>
|
||||||
|
|
||||||
<!-- Preferences -->
|
<!-- Preferences -->
|
||||||
<string name="storage_pref">Storage</string>
|
<string name="storage_pref">Storage</string>
|
||||||
|
|
Loading…
Reference in New Issue