mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-01 09:24:43 +08:00
[Android] update view when go back to previous screen (#286)
This commit is contained in:
committed by
Krzysztof Magiera
parent
78c7745049
commit
5832593980
@@ -240,6 +240,7 @@ public class ScreenContainer<T extends ScreenFragment> extends ViewGroup {
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mIsAttached = true;
|
||||
mNeedUpdate = true;
|
||||
mFragmentManager = findFragmentManager();
|
||||
updateIfNeeded();
|
||||
}
|
||||
@@ -253,6 +254,7 @@ public class ScreenContainer<T extends ScreenFragment> extends ViewGroup {
|
||||
mFragmentManager = null;
|
||||
// so we don't add the same screen twice after re-attach
|
||||
removeAllViews();
|
||||
mActiveScreenFragments.clear();
|
||||
// after re-attach we'll update the screen and add views again
|
||||
markUpdated();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user