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

Do a logic when tab is clicked (before switch to new tab) #58

Open
BigGitWorld opened this issue Oct 1, 2019 · 0 comments
Open

Do a logic when tab is clicked (before switch to new tab) #58

BigGitWorld opened this issue Oct 1, 2019 · 0 comments

Comments

@BigGitWorld
Copy link

I want to do a logic before changing tabs.
In fact, when tab(1) is clicked, logic(1) will be performed.
if logic(1) returns true, tab(2) will be opened, otherwise tab(1) will remain open.

onPageSelected(position) method of setOnPageChangeListener interface returns new tab position, while I want to do my logic before starting to switch the tabs.

how do I have to do that?

@BigGitWorld BigGitWorld changed the title Do a logic when tab is clicked (before new tab is opened) Do a logic when tab is clicked (before switch to new tab) Oct 1, 2019
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

1 participant