|
|
@@ -87,7 +87,7 @@ public class ScreenStack {
|
|
87
|
87
|
nextScreen.show(nextScreen.screenParams.animateScreenTransitions, new Runnable() {
|
|
88
|
88
|
@Override
|
|
89
|
89
|
public void run() {
|
|
90
|
|
- removePreviousWithoutUnmount(previousScreen);
|
|
|
90
|
+ parent.removeView(previousScreen);
|
|
91
|
91
|
}
|
|
92
|
92
|
});
|
|
93
|
93
|
}
|
|
|
@@ -97,7 +97,7 @@ public class ScreenStack {
|
|
97
|
97
|
private void pushScreenToInvisibleStack(LayoutParams layoutParams, Screen nextScreen, Screen previousScreen) {
|
|
98
|
98
|
nextScreen.setVisibility(View.INVISIBLE);
|
|
99
|
99
|
addScreen(nextScreen, layoutParams);
|
|
100
|
|
- removePreviousWithoutUnmount(previousScreen);
|
|
|
100
|
+ parent.removeView(previousScreen);
|
|
101
|
101
|
}
|
|
102
|
102
|
|
|
103
|
103
|
private void addScreen(Screen screen, LayoutParams layoutParams) {
|
|
|
@@ -109,11 +109,6 @@ public class ScreenStack {
|
|
109
|
109
|
parent.addView(screen, parent.getChildCount() - 1, layoutParams);
|
|
110
|
110
|
}
|
|
111
|
111
|
|
|
112
|
|
- private void removePreviousWithoutUnmount(Screen previous) {
|
|
113
|
|
- previous.preventUnmountOnDetachedFromWindow();
|
|
114
|
|
- parent.removeView(previous);
|
|
115
|
|
- }
|
|
116
|
|
-
|
|
117
|
112
|
public void pop(boolean animated) {
|
|
118
|
113
|
pop(animated, null);
|
|
119
|
114
|
}
|
|
|
@@ -146,7 +141,7 @@ public class ScreenStack {
|
|
146
|
141
|
toRemove.hide(animated, new Runnable() {
|
|
147
|
142
|
@Override
|
|
148
|
143
|
public void run() {
|
|
149
|
|
- toRemove.ensureUnmountOnDetachedFromWindow();
|
|
|
144
|
+ toRemove.unmountOnDetachedFromWindow();
|
|
150
|
145
|
parent.removeView(toRemove);
|
|
151
|
146
|
}
|
|
152
|
147
|
});
|
|
|
@@ -163,7 +158,6 @@ public class ScreenStack {
|
|
163
|
158
|
private void readdPrevious(Screen previous) {
|
|
164
|
159
|
previous.setVisibility(View.VISIBLE);
|
|
165
|
160
|
parent.addView(previous, 0);
|
|
166
|
|
- previous.preventMountAfterReattachedToWindow();
|
|
167
|
161
|
}
|
|
168
|
162
|
|
|
169
|
163
|
public void popToRoot(boolean animated) {
|
|
|
@@ -174,7 +168,7 @@ public class ScreenStack {
|
|
174
|
168
|
|
|
175
|
169
|
public void destroy() {
|
|
176
|
170
|
for (Screen screen : stack) {
|
|
177
|
|
- screen.ensureUnmountOnDetachedFromWindow();
|
|
|
171
|
+ screen.unmountOnDetachedFromWindow();
|
|
178
|
172
|
parent.removeView(screen);
|
|
179
|
173
|
}
|
|
180
|
174
|
stack.clear();
|