Search in sources :

Example 1 with PageParams

use of com.reactnativenavigation.params.PageParams 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;
}
Also used : PageParams(com.reactnativenavigation.params.PageParams) NavigationParams(com.reactnativenavigation.params.NavigationParams) NonNull(android.support.annotation.NonNull)

Example 2 with PageParams

use of com.reactnativenavigation.params.PageParams in project react-native-navigation by wix.

the class ContentViewPagerAdapter method sendAppearEvents.

private void sendAppearEvents(int position) {
    PageParams pageParams = this.pageParams.get(position);
    pageParams.timestamp = System.currentTimeMillis();
    NavigationApplication.instance.getEventEmitter().sendWillAppearEvent(pageParams, NavigationType.TopTabSelected);
    NavigationApplication.instance.getEventEmitter().sendDidAppearEvent(pageParams, NavigationType.TopTabSelected);
}
Also used : PageParams(com.reactnativenavigation.params.PageParams)

Example 3 with PageParams

use of com.reactnativenavigation.params.PageParams in project react-native-navigation by wix.

the class ContentViewPagerAdapter method sendDisappearEvents.

private void sendDisappearEvents(int position) {
    PageParams pageParams = this.pageParams.get(position);
    pageParams.timestamp = System.currentTimeMillis();
    NavigationApplication.instance.getEventEmitter().sendWillDisappearEvent(pageParams, NavigationType.TopTabSelected);
    NavigationApplication.instance.getEventEmitter().sendDidDisappearEvent(pageParams, NavigationType.TopTabSelected);
}
Also used : PageParams(com.reactnativenavigation.params.PageParams)

Aggregations

PageParams (com.reactnativenavigation.params.PageParams)3 NonNull (android.support.annotation.NonNull)1 NavigationParams (com.reactnativenavigation.params.NavigationParams)1