new ShowcaseView.Builder(mainTabActivity)
.withHoloShowcase()
.setTarget(new ViewTarget(recyclerView.findViewHolderForAdapterPosition(0).itemView))
.setContentTitle(getString(R.string.tutorial_welcome))
.setContentText(getString(R.string.tutorial_cardview_add))
.hideOnTouchOutside()
.build();
This is my code when attaching the showcaseview onto the recyclerview first item. It works although the animation seems to be laggy I don't know why, and also the problem is when I touch outside or press the "ok" button. The showcaseview does not hide instead I have to press the "ok" or touchoutside for a few times "four times" I think, to make it go away completely. Am I missing something?
I am using this https://github.com/amlcurran/ShowcaseView library.
I have tried giving it an onClickListener and calling removeAllViews() but it's crashing the app.
I found a solution, what I did was to directly initiate the whole thing in the adapter of the recyclerview and hold it in a condition that would prevent it from popping up more than once.