Merge branch 'eoineoineoin-master' into eoineoineoin-develop2
This commit is contained in:
commit
8a9d6a29e7
|
@ -126,7 +126,7 @@ public abstract class PodcastListFragment extends Fragment {
|
|||
protected void onPostExecute(List<GpodnetPodcast> gpodnetPodcasts) {
|
||||
super.onPostExecute(gpodnetPodcasts);
|
||||
final Context context = getActivity();
|
||||
if (context != null && gpodnetPodcasts != null) {
|
||||
if (context != null && gpodnetPodcasts != null && gpodnetPodcasts.size() > 0) {
|
||||
PodcastListAdapter listAdapter = new PodcastListAdapter(context, 0, gpodnetPodcasts);
|
||||
gridView.setAdapter(listAdapter);
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
@ -135,13 +135,18 @@ public abstract class PodcastListFragment extends Fragment {
|
|||
gridView.setVisibility(View.VISIBLE);
|
||||
txtvError.setVisibility(View.GONE);
|
||||
butRetry.setVisibility(View.GONE);
|
||||
} else if (context != null && gpodnetPodcasts != null) {
|
||||
gridView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
txtvError.setText(getString(R.string.search_status_no_results));
|
||||
txtvError.setVisibility(View.VISIBLE);
|
||||
butRetry.setVisibility(View.GONE);
|
||||
} else if (context != null) {
|
||||
gridView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
txtvError.setText(getString(R.string.error_msg_prefix) + exception.getMessage());
|
||||
txtvError.setVisibility(View.VISIBLE);
|
||||
butRetry.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue