|
@@ -117,6 +117,7 @@ public class ScreenStack {
|
117
|
117
|
@Nullable final Screen.OnDisplayListener onDisplay) {
|
118
|
118
|
nextScreen.setVisibility(View.INVISIBLE);
|
119
|
119
|
addScreen(nextScreen, layoutParams);
|
|
120
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("willDisappear", previousScreen.getNavigatorEventId());
|
120
|
121
|
nextScreen.setOnDisplayListener(new Screen.OnDisplayListener() {
|
121
|
122
|
@Override
|
122
|
123
|
public void onDisplay() {
|
|
@@ -124,6 +125,7 @@ public class ScreenStack {
|
124
|
125
|
@Override
|
125
|
126
|
public void run() {
|
126
|
127
|
if (onDisplay != null) onDisplay.onDisplay();
|
|
128
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("didDisappear", previousScreen.getNavigatorEventId());
|
127
|
129
|
parent.removeView(previousScreen);
|
128
|
130
|
}
|
129
|
131
|
});
|
|
@@ -196,6 +198,8 @@ public class ScreenStack {
|
196
|
198
|
|
197
|
199
|
private void readdPrevious(Screen previous) {
|
198
|
200
|
previous.setVisibility(View.VISIBLE);
|
|
201
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("willAppear", previous.getNavigatorEventId());
|
|
202
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("didAppear", previous.getNavigatorEventId());
|
199
|
203
|
parent.addView(previous, 0);
|
200
|
204
|
}
|
201
|
205
|
|
|
@@ -347,9 +351,13 @@ public class ScreenStack {
|
347
|
351
|
isStackVisible = true;
|
348
|
352
|
stack.peek().setStyle();
|
349
|
353
|
stack.peek().setVisibility(View.VISIBLE);
|
|
354
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("willAppear", stack.peek().getNavigatorEventId());
|
|
355
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("didAppear", stack.peek().getNavigatorEventId());
|
350
|
356
|
}
|
351
|
357
|
|
352
|
358
|
public void hide() {
|
|
359
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("willDisappear", stack.peek().getNavigatorEventId());
|
|
360
|
+ NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("didDisappear", stack.peek().getNavigatorEventId());
|
353
|
361
|
isStackVisible = false;
|
354
|
362
|
stack.peek().setVisibility(View.INVISIBLE);
|
355
|
363
|
}
|