Open guelo opened 5 years ago
What is the current behavior on process death? Default init settings? Isnt it a leak? Because fragments are still inside FragmentManager, arent they?
Yes it's a leak. BottomNavigator will create new fragments and ignore the existing ones inside FragmentManager.
Considered several solutions and decided that in the interest of keeping BottomNavigator's API small we'll use androidx's Lifecycle Viewmodel Savedstate when it becomes available. Unfortunately that library is at version 1.0.0-alpha03 and it requires activity:1.1.0-alpha02 and fragment:1.2.0-alpha02, which means that we'll force those requirements on users of the library.
Moved the memory leak bug to Issue #4. This ticket is for the enhancement to preserve BottomNavigator state after process death.
Save BottomNavigator state in saveInstanceState.