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

Always trigger OnTabInterceptListener #3

Closed
danbo2468 opened this issue Mar 17, 2020 · 6 comments
Closed

Always trigger OnTabInterceptListener #3

danbo2468 opened this issue Mar 17, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@danbo2468
Copy link

Ability to trigger OnTabInterceptListener even when the clicked tab is the currently selected tab.

@Droppers
Copy link
Owner

Droppers commented Mar 17, 2020

What would be the use-case for this?

I think it should only be called whenever a new tab is selected, because when it is selected it is already too late to prevent it from being selected?

@danbo2468
Copy link
Author

In my application, I open a new fragment by clicking a button on the initial fragment. The bottom navigation state won't be changed at that moment, so the same item remains selected. When the user clicks the already selected item again, the initial fragment should be shown. At this moment, I can't achieve that since the listener won't get triggered.

@Droppers
Copy link
Owner

Droppers commented Mar 18, 2020

If I understand correctly, you want the user to be able to return to the top level fragment whenever he presses a selected tab again?

I think adding a onTabReselected method to OnTabSelectListener would make more sense, would this satisfy your needs?

@danbo2468
Copy link
Author

Yes, that sounds great. That might even be better!

@Droppers
Copy link
Owner

@danbo2468 it is available now in version 1.0.5 :)!

@danbo2468
Copy link
Author

Thank you! You're the best!

@Droppers Droppers added the enhancement New feature or request label Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants