use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class SingleScreenLayout method push.
@Override
public void push(ScreenParams params) {
stack.push(params, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
EventBus.instance.post(new ScreenChangedEvent(params));
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class BottomTabsLayout method onBackPressed.
@Override
public boolean onBackPressed() {
if (getCurrentScreenStack().handleBackPressInJs()) {
return true;
}
if (getCurrentScreenStack().canPop()) {
getCurrentScreenStack().pop(true);
setBottomTabsStyleFromCurrentScreen();
EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
return true;
} else {
return false;
}
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class BottomTabsLayout method onTabSelected.
@Override
public boolean onTabSelected(int position, boolean wasSelected) {
if (wasSelected) {
return false;
}
hideCurrentStack();
showNewStack(position);
EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
sendTabSelectedEventToJs();
return true;
}
use of com.reactnativenavigation.events.ScreenChangedEvent in project react-native-navigation by wix.
the class SingleScreenLayout method newStack.
@Override
public void newStack(final ScreenParams params) {
stack.newStack(params, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
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));
}
}
Aggregations