use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class SingleScreenLayout method onModalDismissed.
@Override
public void onModalDismissed() {
stack.peek().setStyle();
stack.peek().getScreenParams().timestamp = System.currentTimeMillis();
NavigationApplication.instance.getEventEmitter().sendWillAppearEvent(stack.peek().getScreenParams(), NavigationType.DismissModal);
NavigationApplication.instance.getEventEmitter().sendDidAppearEvent(stack.peek().getScreenParams(), NavigationType.DismissModal);
EventBus.instance.post(new ScreenChangedEvent(stack.peek().getScreenParams()));
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class SingleScreenLayout method push.
@Override
public void push(ScreenParams params, Promise onPushComplete) {
stack.push(params, new LayoutParams(MATCH_PARENT, MATCH_PARENT), onPushComplete);
EventBus.instance.post(new ScreenChangedEvent(params));
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class BottomTabsLayout method newStack.
@Override
public void newStack(final ScreenParams params) {
ScreenStack screenStack = getScreenStack(params.getNavigatorId());
screenStack.newStack(params, createScreenLayoutParams(params));
if (isCurrentStack(screenStack)) {
bottomTabs.setStyleFromScreen(params.styleParams);
EventBus.instance.post(new ScreenChangedEvent(params));
}
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class BottomTabsLayout method push.
@Override
public void push(ScreenParams params) {
ScreenStack screenStack = getScreenStack(params.getNavigatorId());
screenStack.push(params, createScreenLayoutParams(params));
if (isCurrentStack(screenStack)) {
bottomTabs.setStyleFromScreen(params.styleParams);
EventBus.instance.post(new ScreenChangedEvent(params));
}
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class ContentViewPagerAdapter method onPageSelected.
@Override
public void onPageSelected(int position) {
EventBus.instance.post(new ViewPagerScreenChangedEvent());
sendDisappearEvents(currentPosition);
currentPosition = position;
EventBus.instance.post(new ScreenChangedEvent(pageParams.get(currentPosition)));
sendTabSelectedEventToJs();
sendAppearEvents(position);
}
Aggregations