Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable auto close #16

Open
izzuddinraffar opened this issue Mar 15, 2017 · 5 comments
Open

How to disable auto close #16

izzuddinraffar opened this issue Mar 15, 2017 · 5 comments

Comments

@izzuddinraffar
Copy link

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)

@UniqueSecure
Copy link

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

@albo1337
Copy link

albo1337 commented May 4, 2017

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

@albo1337
Copy link

albo1337 commented May 8, 2017

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

@rohankandwal
Copy link

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

@codeZeroDev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants