diff --git a/README.md b/README.md index 9639a3ce1..5fbf4bd4f 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,19 @@ Project set-up If you're using a Gradle-based project, then you can add SCV as a dependency directly: ~~~ -compile 'com.github.amlcurran.showcaseview:library:5.4.2' +compile 'com.github.amlcurran.showcaseview:library:5.4.3' ~~~ If you're using Maven (but not Gradle), you can add the APKlib as a dependency: -~~~ +```xml com.github.amlcurran.showcaseview library - 5.4.2 + 5.4.3 apklib -~~~ +``` If you're using a standard project without either Maven or Gradle, you'll have to download the project, and the add the library manually to your project. @@ -41,14 +41,14 @@ To use ShowcaseView, use the Builder pattern. As an example: -~~~ +```java new ShowcaseView.Builder(this) .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.HOME)) .setContentTitle("ShowcaseView") .setContentText("This is highlighting the Home button") .hideOnTouchOutside() .build(); -~~~ +``` You can use styles to customise how a ShowcaseView looks. I'll write more documentation soon, but for now, check out the sample project's [styles](https://github.com/amlcurran/ShowcaseView/blob/master/sample/src/main/res/values/styles.xml). diff --git a/gradle.properties b/gradle.properties index 04d182c59..3857cbaea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ # limitations under the License. # -VERSION_CODE=50402 +VERSION_CODE=50403 GROUP=com.github.amlcurran.showcaseview POM_DESCRIPTION=Highlight the best bits of your app to users quickly, simply, and cool...ly 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..4e4286888 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) { @@ -738,7 +740,7 @@ public void setTitleTextAlignment(Layout.Alignment textAlignment) { /** * Set the duration of the fading in and fading out of the ShowcaseView */ - private void setFadeDurations(long fadeInMillis, long fadeOutMillis) { + public void setFadeDurations(long fadeInMillis, long fadeOutMillis) { this.fadeInMillis = fadeInMillis; this.fadeOutMillis = fadeOutMillis; } 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; } }