From bcd42dd9d89a3d83b53d6710fd2e3269d6fa1792 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Tue, 29 Mar 2016 19:57:03 -0400 Subject: some tweeks to visibility to prevent some rendering bugs --- app/src/main/java/de/danoeh/antennapod/adapter/CoverTarget.java | 3 --- .../java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/CoverTarget.java b/app/src/main/java/de/danoeh/antennapod/adapter/CoverTarget.java index ba7175a9b..ed0c08086 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/CoverTarget.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/CoverTarget.java @@ -16,9 +16,6 @@ import java.lang.ref.WeakReference; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.core.glide.ApGlideSettings; -/** - * Created by Tom on 3/29/16. - */ class CoverTarget extends GlideDrawableImageViewTarget { private final WeakReference fallback; diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java index 1e90fe74a..30c77443c 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java @@ -93,6 +93,10 @@ public class SubscriptionsAdapter extends BaseAdapter implements AdapterView.OnI if (position == ADD_POSITION) { holder.feedTitle.setText(R.string.add_feed_label); + holder.feedTitle.setVisibility(View.VISIBLE); + // prevent any accidental re-use of old values (not sure how that would happen...) + holder.count.setPrimaryText(""); + // make it go away, we don't need it for add feed holder.count.setVisibility(View.INVISIBLE); Glide.with(mainActivityRef.get()) .load(R.drawable.ic_add_grey_600_48dp) @@ -105,8 +109,9 @@ public class SubscriptionsAdapter extends BaseAdapter implements AdapterView.OnI if (feed == null) return null; holder.feedTitle.setText(feed.getTitle()); - holder.count.setVisibility(View.VISIBLE); + holder.feedTitle.setVisibility(View.VISIBLE); holder.count.setPrimaryText(String.valueOf(itemAccess.getFeedCounter(feed.getId()))); + holder.count.setVisibility(View.VISIBLE); Glide.with(mainActivityRef.get()) .load(feed.getImageUri()) .error(R.color.light_gray) -- cgit v1.2.3