aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.84k stars 682 forks source link

Don't save the current tab selected #334

Open mirk8xr opened 6 years ago

mirk8xr commented 6 years ago

I am using the 2.2.0 version of this library and it works all pretty well except one thing. If I click on a button inside a fragment tab and open a new activity, when I return by the back-button in the toolbar the first tab is always selected in the previous activity. How can I restore the selected tab before leaving the activity?

RedEagle07 commented 6 years ago

Did you manage to fix this?

mirk8xr commented 6 years ago

In my project, I used android SharedPreferences to save the current tab and select the tab in "onResume" activity.