[Android] update view when go back to previous screen (#286)

This commit is contained in:
Tuan Luong
2020-01-20 16:58:19 +07:00
committed by Krzysztof Magiera
parent 78c7745049
commit 5832593980

View File

@@ -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();
}