use of com.reactnativenavigation.params.ScreenParams in project react-native-navigation by wix.
the class NavigationCommandsHandler method pop.
public static void pop(Bundle screenParams) {
final NavigationActivity currentActivity = NavigationActivity.currentActivity;
if (currentActivity == null) {
return;
}
final ScreenParams params = ScreenParamsParser.parse(screenParams);
NavigationApplication.instance.runOnMainThread(new Runnable() {
@Override
public void run() {
currentActivity.pop(params);
}
});
}
use of com.reactnativenavigation.params.ScreenParams in project react-native-navigation by wix.
the class NavigationCommandsHandler method popToRoot.
public static void popToRoot(Bundle screenParams) {
final NavigationActivity currentActivity = NavigationActivity.currentActivity;
if (currentActivity == null) {
return;
}
final ScreenParams params = ScreenParamsParser.parse(screenParams);
NavigationApplication.instance.runOnMainThread(new Runnable() {
@Override
public void run() {
currentActivity.popToRoot(params);
}
});
}
use of com.reactnativenavigation.params.ScreenParams in project react-native-navigation by wix.
the class NavigationCommandsHandler method push.
public static void push(Bundle screenParams) {
final NavigationActivity currentActivity = NavigationActivity.currentActivity;
if (currentActivity == null) {
return;
}
final ScreenParams params = ScreenParamsParser.parse(screenParams);
NavigationApplication.instance.runOnMainThread(new Runnable() {
@Override
public void run() {
currentActivity.push(params);
}
});
}
use of com.reactnativenavigation.params.ScreenParams in project react-native-navigation by wix.
the class NavigationCommandsHandler method showModal.
public static void showModal(Bundle params) {
final NavigationActivity currentActivity = NavigationActivity.currentActivity;
if (currentActivity == null) {
return;
}
final ScreenParams screenParams = ScreenParamsParser.parse(params);
NavigationApplication.instance.runOnMainThread(new Runnable() {
@Override
public void run() {
currentActivity.showModal(screenParams);
}
});
}
use of com.reactnativenavigation.params.ScreenParams in project react-native-navigation by wix.
the class BottomTabsLayout method createAndAddScreens.
private void createAndAddScreens(int position) {
ScreenParams screenParams = params.tabParams.get(position);
ScreenStack newStack = new ScreenStack(getActivity(), getScreenStackParent(), screenParams.getNavigatorId(), this);
newStack.pushInitialScreen(screenParams, createScreenLayoutParams(screenParams));
for (ScreenParams screen : screenParams.screens) {
newStack.pushInitialScreen(screen, createScreenLayoutParams(screen));
}
screenStacks[position] = newStack;
}
Aggregations