Skip to content
This repository was archived by the owner on Apr 24, 2018. It is now read-only.

Commit 0e6a8b4

Browse files
committed
Fix showing thw showcase I get
1 parent 15a537b commit 0e6a8b4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

library/src/main/java/com/github/amlcurran/showcaseview/ShowcaseView.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ private void updateBitmap() {
209209
bitmapBuffer.recycle();
210210
}
211211
bitmapBuffer = Bitmap.createBitmap(getMeasuredWidth(), getMeasuredHeight(), Bitmap.Config.ARGB_8888);
212-
213212
}
214213
}
215214

@@ -337,10 +336,17 @@ public void onAnimationEnd() {
337336
@Override
338337
public void show() {
339338
isShowing = true;
339+
if (canUpdateBitmap()) {
340+
updateBitmap();
341+
}
340342
mEventListener.onShowcaseViewShow(this);
341343
fadeInShowcase();
342344
}
343345

346+
private boolean canUpdateBitmap() {
347+
return getMeasuredHeight() > 0 && getMeasuredWidth() > 0;
348+
}
349+
344350
private void fadeInShowcase() {
345351
animationFactory.fadeInView(
346352
this, fadeInMillis,

0 commit comments

Comments
 (0)