'How to react to changes in back stack for fragments in android?
Since FragmentManager is deprecated now below code gives me an error:
getFragmentManager().addOnBackStackChangedListener(
new FragmentManager.OnBackStackChangedListener() {
public void onBackStackChanged() {
// whenever back stack changes, the code here runs
}
}
);
What is the new way to listen to whenever the contents of the back stack change ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|