Update selected tab onbackPressed
See original GitHub issueI’ve tried mBottomBar.setActivated(true) but does nothing. The only way seems to be mBottomBar.selectTabWithId(R.id.bottomBarItemOne) or mBottomBar.selectTabAtPosition(position). But this will call the selectedTab/reselectedTab listener which it’s not good because it will recreate my fragments when the OS already restored their state.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
onBackPressed change tabs in android - kotlin - Stack Overflow
onBackPressed change tabs in android ... I am looking for explanation for onBackPressed() change my tabs i have 3 different tabs in my...
Read more >Provide custom back navigation - Android Developers
All Android devices provide a Back button for this type of navigation, ... You can change the enabled state by calling setEnabled() ....
Read more >Complete working solution for Android action bar tabs with ...
Complete working solution for Android action bar tabs with fragments having separate back stack for each tab. - OnItemSelectedListener.java.
Read more >Onbackpressed Change Tabs In Android - ADocLib
andreynovikov / OnItemSelectedListener.java. Last active 14 months ago. Complete working solution for Android action bar tabs with fragments having separate.
Read more >Separate Back Navigation for a Tabbed View Pager in Android
In this case, the state of a tab consists of the current view and the complete ... please let me know as I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@firetrap Just search in SO, and maybe transaction.commitAllowingStateLoss() will meet your need.
There is no possibility of setting the active Tab without triggering selectedTab/reselectedTab listener. Will there be a fix in the near future? A feedback on this matter would be great. cheers