TutoShowcase icon indicating copy to clipboard operation
TutoShowcase copied to clipboard

How to disable auto close

Open izzuddinraffar opened this issue 7 years ago • 5 comments

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)

izzuddinraffar avatar Mar 15 '17 12:03 izzuddinraffar

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 } })

UniqueSecure avatar Mar 29 '17 22:03 UniqueSecure

I have the same problem. I just want to close the showcase on custom button click. Not on whole view.

albo1337 avatar May 04 '17 07:05 albo1337

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 avatar May 08 '17 12:05 albo1337

@albo1337 Thanks for your code, it works perfectly. They should add it to readme file

rohankandwal avatar Aug 06 '17 18:08 rohankandwal

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

codeZeroDev avatar May 25 '20 15:05 codeZeroDev