TutoShowcase
TutoShowcase copied to clipboard
How to disable auto close
Hi, thanks for great plugin, but I want to disable auto close when clicking on TutoShowcase. That mean I just want to close it using custom button.
Maybe have a syntax i can use like TutoShowcase.from(this) .enableClose(false)
My guess is that you may need to use a dismiss listener. Try this. Is in the sample code.
TutoShowcase.from(this) .setListener(new TutoShowcase.Listener() { @Override public void onDismissed() { //Implement your action here } })
I have the same problem. I just want to close the showcase on custom button click. Not on whole view.
I found it out by myself. The show() method sets always a onClickListener to the whole container. To override this functionality you have to call the .onClickContentView(id, listener)
after the .show()
.
So to set the listener for the container to null you have to do this:
tutoShowcase.setContentView(R.layout.your_layout)
.withDismissView(R.id.showcase_close_button) // this is my dismiss button
.on(anyViewToHighlight)
.addCircle()
.show()
.onClickContentView(R.id.your_layout_container, null);
@albo1337 Thanks for your code, it works perfectly. They should add it to readme file
Hi,any solution for this ? if i use onClickContentView(R.id.your_layout_container, null); then my layout item cant click anymore? help please thanks