From e262db2d07e6790309626fd245b13fe10a8eb9fb Mon Sep 17 00:00:00 2001 From: Alex Curran Date: Wed, 6 Apr 2016 21:25:39 +0100 Subject: [PATCH] Fix #377, where changing the text wouldn't update the ShowcaseView --- .../java/com/github/amlcurran/showcaseview/ShowcaseView.java | 2 ++ .../main/java/com/github/amlcurran/showcaseview/TextDrawer.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/library/src/main/java/com/github/amlcurran/showcaseview/ShowcaseView.java b/library/src/main/java/com/github/amlcurran/showcaseview/ShowcaseView.java index 1e7d5bcb2..9c9746714 100644 --- a/library/src/main/java/com/github/amlcurran/showcaseview/ShowcaseView.java +++ b/library/src/main/java/com/github/amlcurran/showcaseview/ShowcaseView.java @@ -405,11 +405,13 @@ private void hideImmediate() { @Override public void setContentTitle(CharSequence title) { textDrawer.setContentTitle(title); + invalidate(); } @Override public void setContentText(CharSequence text) { textDrawer.setContentText(text); + invalidate(); } private void setScaleMultiplier(float scaleMultiplier) { diff --git a/library/src/main/java/com/github/amlcurran/showcaseview/TextDrawer.java b/library/src/main/java/com/github/amlcurran/showcaseview/TextDrawer.java index c8391bf27..2b0d827d0 100644 --- a/library/src/main/java/com/github/amlcurran/showcaseview/TextDrawer.java +++ b/library/src/main/java/com/github/amlcurran/showcaseview/TextDrawer.java @@ -112,6 +112,7 @@ public void setContentText(CharSequence details) { SpannableString ssbDetail = new SpannableString(details); ssbDetail.setSpan(textSpan, 0, ssbDetail.length(), 0); textString = ssbDetail; + hasRecalculated = true; } } @@ -120,6 +121,7 @@ public void setContentTitle(CharSequence title) { SpannableString ssbTitle = new SpannableString(title); ssbTitle.setSpan(titleSpan, 0, ssbTitle.length(), 0); titleString = ssbTitle; + hasRecalculated = true; } }