question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update selected tab onbackPressed

See original GitHub issue

I’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:open
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
smoothdvdcommented, Aug 30, 2016

@firetrap Just search in SO, and maybe transaction.commitAllowingStateLoss() will meet your need.

0reactions
msdrozdcommented, Sep 23, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found