Skip to content

Instantly share code, notes, and snippets.

@babedev
Last active November 4, 2016 16:09
Show Gist options
  • Save babedev/dbe32da1835c24c09772ac8977a4cfef to your computer and use it in GitHub Desktop.
Save babedev/dbe32da1835c24c09772ac8977a4cfef to your computer and use it in GitHub Desktop.
ViewTreeObserver viewTreeObserver = lvRoot.getViewTreeObserver();
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
listView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
View view = listView.getChildAt(1).findViewById(R.id.icon);
TapTargetView.showFor(TutorialActivity.this, TapTarget.forView(view
, "New Feature", "Click me!!!")
.drawShadow(true)
.cancelable(false)
.tintTarget(false)
.transparentTarget(false));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment