Search in sources :

Example 1 with ScreenStack

use of com.reactnativenavigation.screens.ScreenStack in project react-native-navigation by wix.

the class BottomTabsLayout method hideCurrentStack.

private void hideCurrentStack() {
    ScreenStack currentScreenStack = getCurrentScreenStack();
    currentScreenStack.hide(NavigationType.BottomTabSelected);
}
Also used : ScreenStack(com.reactnativenavigation.screens.ScreenStack)

Example 2 with ScreenStack

use of com.reactnativenavigation.screens.ScreenStack 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;
}
Also used : ScreenParams(com.reactnativenavigation.params.ScreenParams) ScreenStack(com.reactnativenavigation.screens.ScreenStack)

Example 3 with ScreenStack

use of com.reactnativenavigation.screens.ScreenStack in project react-native-navigation by wix.

the class BottomTabsLayout method pop.

@Override
public void pop(final ScreenParams params) {
    performOnStack(params.getNavigatorId(), new Task<ScreenStack>() {

        @Override
        public void run(ScreenStack stack) {
            stack.pop(params.animateScreenTransitions, params.timestamp, new ScreenStack.OnScreenPop() {

                @Override
                public void onScreenPopAnimationEnd() {
                    setBottomTabsStyleFromCurrentScreen();
                    EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
                }
            });
        }
    });
}
Also used : ScreenStack(com.reactnativenavigation.screens.ScreenStack) ScreenChangedEvent(com.reactnativenavigation.events.ScreenChangedEvent)

Example 4 with ScreenStack

use of com.reactnativenavigation.screens.ScreenStack in project react-native-navigation by wix.

the class BottomTabsLayout method destroy.

@Override
public void destroy() {
    snackbarAndFabContainer.destroy();
    for (ScreenStack screenStack : screenStacks) {
        screenStack.destroy();
    }
    if (sideMenu != null) {
        sideMenu.destroy();
    }
    if (lightBox != null) {
        lightBox.destroy();
        lightBox = null;
    }
    slidingOverlaysQueue.destroy();
}
Also used : ScreenStack(com.reactnativenavigation.screens.ScreenStack)

Example 5 with ScreenStack

use of com.reactnativenavigation.screens.ScreenStack 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));
    }
}
Also used : ScreenStack(com.reactnativenavigation.screens.ScreenStack) ScreenChangedEvent(com.reactnativenavigation.events.ScreenChangedEvent)

Aggregations

ScreenStack (com.reactnativenavigation.screens.ScreenStack)9 ScreenChangedEvent (com.reactnativenavigation.events.ScreenChangedEvent)4 ScreenParams (com.reactnativenavigation.params.ScreenParams)1