use of com.reactnativenavigation.params.NavigationParams in project react-native-navigation by wix.
the class SlidingOverlayParamsParser method parse.
public SlidingOverlayParams parse(Bundle bundle) {
final SlidingOverlayParams result = new SlidingOverlayParams();
result.screenInstanceId = bundle.getString("screen");
result.navigationParams = new NavigationParams(bundle.getBundle("navigationParams"));
result.autoDismissTimerSec = bundle.containsKey("autoDismissTimerSec") ? bundle.getInt("autoDismissTimerSec") : null;
result.position = SlidingOverlayParams.Position.fromString(bundle.getString("position", "top"));
return result;
}
use of com.reactnativenavigation.params.NavigationParams in project react-native-navigation by wix.
the class TopTabParamsParser method parseItem.
@NonNull
private static PageParams parseItem(Bundle params) {
PageParams result = new PageParams();
result.screenId = params.getString(KEY_SCREEN_ID);
result.title = params.getString(KEY_TITLE);
result.tabIcon = new TabIconParser(params).parse();
result.navigationParams = new NavigationParams(params.getBundle(NAVIGATION_PARAMS));
result.leftButton = ButtonParser.parseLeftButton(params);
result.rightButtons = ButtonParser.parseRightButton(params);
result.fabParams = ButtonParser.parseFab(params, result.navigationParams.navigatorEventId, result.navigationParams.screenInstanceId);
result.styleParams = new StyleParamsParser(params.getBundle("styleParams")).parse();
return result;
}
use of com.reactnativenavigation.params.NavigationParams in project react-native-navigation by wix.
the class LightBoxParamsParser method parse.
public LightBoxParams parse() {
LightBoxParams result = new LightBoxParams();
if (params.isEmpty()) {
return result;
}
result.screenId = params.getString("screenId");
result.navigationParams = new NavigationParams(params.getBundle("navigationParams"));
result.backgroundColor = getColor(params, "backgroundColor");
result.tapBackgroundToDismiss = params.getBoolean("tapBackgroundToDismiss");
result.overrideBackPress = params.getBoolean("overrideBackPress");
result.adjustSoftInput = Adjustment.fromString(params.getString("adjustSoftInput")).value;
return result;
}
use of com.reactnativenavigation.params.NavigationParams in project react-native-navigation by wix.
the class ScreenParamsParser method parse.
@SuppressWarnings("ConstantConditions")
public static ScreenParams parse(Bundle params) {
ScreenParams result = new ScreenParams();
result.screenId = params.getString(KEY_SCREEN_ID);
result.timestamp = params.getDouble(KEY_TIMESTAMP);
assertKeyExists(params, KEY_NAVIGATION_PARAMS);
result.navigationParams = new NavigationParams(params.getBundle(KEY_NAVIGATION_PARAMS));
result.styleParams = new StyleParamsParser(params.getBundle(STYLE_PARAMS)).parse();
result.title = params.getString(KEY_TITLE);
result.subtitle = params.getString(KEY_SUBTITLE);
result.rightButtons = ButtonParser.parseRightButton(params);
result.overrideBackPressInJs = params.getBoolean(OVERRIDE_BACK_PRESS, false);
result.leftButton = ButtonParser.parseLeftButton(params);
result.topTabParams = parseTopTabs(params);
if (hasKey(params, "screens")) {
result.screens = parseScreens(params.getBundle("screens"));
}
if (hasKey(params, FRAGMENT_CREATOR_CLASS_NAME)) {
result.fragmentCreatorClassName = params.getString(FRAGMENT_CREATOR_CLASS_NAME);
result.fragmentCreatorPassProps = params.getBundle(FRAGMENT_CREATOR_PASS_PROPS);
}
result.fabParams = ButtonParser.parseFab(params, result.navigationParams.navigatorEventId, result.navigationParams.screenInstanceId);
result.tabLabel = getTabLabel(params);
result.tabIcon = new TabIconParser(params).parse();
result.animateScreenTransitions = new AnimationParser(params).parse();
result.sharedElementsTransitions = getSharedElementsTransitions(params);
result.animationType = params.getString(ANIMATION_TYPE, AppStyle.appStyle.screenAnimationType);
return result;
}
use of com.reactnativenavigation.params.NavigationParams in project react-native-navigation by wix.
the class SideMenuParamsParser method parseSideMenu.
private static SideMenuParams parseSideMenu(@Nullable Bundle sideMenu, Side side) {
if (sideMenu == null || sideMenu.isEmpty()) {
return null;
}
SideMenuParams result = new SideMenuParams();
result.screenId = sideMenu.getString("screenId");
result.navigationParams = new NavigationParams(sideMenu.getBundle("navigationParams"));
result.disableOpenGesture = sideMenu.getBoolean("disableOpenGesture", false);
result.fixedWidth = sideMenu.getInt("fixedWidth", 0);
result.side = side;
return result;
}
Aggregations