diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-05-28 22:42:08 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-05-28 22:42:08 +0200 |
commit | ef518f3ec0a489d843da4af053767d9f59fa827f (patch) | |
tree | 5e5b952bf681a6837a7bfe6855d9625a4a9885a7 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 12f9d29daabd7b3f400cfce23fe6e6bc8d402270 (diff) | |
download | AntennaPod-ef518f3ec0a489d843da4af053767d9f59fa827f.zip |
Handle failed refresh correctly, fix for nav drawer layout
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index 13982f57d..0d2d5cfa0 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -12,6 +12,7 @@ import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.IconTextView; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; import com.squareup.picasso.Picasso; @@ -267,8 +268,12 @@ public class NavListAdapter extends BaseAdapter if(feed.hasLastUpdateFailed()) { + RelativeLayout.LayoutParams p = (RelativeLayout.LayoutParams) holder.title.getLayoutParams(); + p.addRule(RelativeLayout.LEFT_OF, R.id.itxtvFailure); holder.failure.setVisibility(View.VISIBLE); } else { + RelativeLayout.LayoutParams p = (RelativeLayout.LayoutParams) holder.title.getLayoutParams(); + p.addRule(RelativeLayout.LEFT_OF, R.id.txtvCount); holder.failure.setVisibility(View.GONE); } int feedUnreadItems = itemAccess.getNumberOfUnreadFeedItems(feed.getId()); @@ -277,7 +282,7 @@ public class NavListAdapter extends BaseAdapter holder.count.setText(String.valueOf(feedUnreadItems)); holder.count.setTypeface(holder.title.getTypeface()); } else { - holder.count.setVisibility(View.INVISIBLE); + holder.count.setVisibility(View.GONE); } return convertView; } |