From 6387e7520c0cf89a0c582ca92125c715c507c955 Mon Sep 17 00:00:00 2001 From: ligi Date: Sat, 15 Nov 2014 16:10:12 +0100 Subject: [PATCH] date visible after being invisible --- src/main/java/org/ligi/passandroid/ui/PassViewHolder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/ligi/passandroid/ui/PassViewHolder.java b/src/main/java/org/ligi/passandroid/ui/PassViewHolder.java index f663563d..0e26e484 100644 --- a/src/main/java/org/ligi/passandroid/ui/PassViewHolder.java +++ b/src/main/java/org/ligi/passandroid/ui/PassViewHolder.java @@ -96,6 +96,7 @@ public class PassViewHolder extends RecyclerView.ViewHolder { activity.startActivity(intent); } }); + addCalendar.setVisibility(View.VISIBLE); } else { addCalendar.setVisibility(View.GONE); } @@ -124,7 +125,9 @@ public class PassViewHolder extends RecyclerView.ViewHolder { if (pass.getRelevantDate().isPresent()) { final CharSequence relativeDateTimeString = DateUtils.getRelativeDateTimeString(root.getContext(), pass.getRelevantDate().get().getMillis(), DateUtils.MINUTE_IN_MILLIS, DateUtils.WEEK_IN_MILLIS, 0); date.setText(relativeDateTimeString); + date.setVisibility(View.VISIBLE); } else if (pass.getExpirationDate().isPresent()) { + date.setVisibility(View.VISIBLE); final CharSequence relativeDateTimeString = DateUtils.getRelativeDateTimeString(root.getContext(), pass.getExpirationDate().get().getMillis(), DateUtils.MINUTE_IN_MILLIS, DateUtils.WEEK_IN_MILLIS, 0); if (pass.getExpirationDate().get().isAfterNow()) {