Search in sources :

Example 1 with TopTabsController

use of com.reactnativenavigation.viewcontrollers.toptabs.TopTabsController in project react-native-navigation by wix.

the class LayoutFactory method createTopTabs.

private ViewController<?> createTopTabs(LayoutNode node) {
    final List<ViewController<?>> tabs = new ArrayList<>();
    for (int i = 0; i < node.children.size(); i++) {
        ViewController<?> tabController = create(node.children.get(i));
        Options options = parseOptions(node.children.get(i).getOptions());
        options.setTopTabIndex(i);
        tabs.add(tabController);
    }
    return new TopTabsController(activity, childRegistry, node.id, tabs, new TopTabsLayoutCreator(activity, tabs), parseOptions(node.getOptions()), new Presenter(activity, defaultOptions));
}
Also used : TopTabsLayoutCreator(com.reactnativenavigation.views.toptabs.TopTabsLayoutCreator) ComponentViewController(com.reactnativenavigation.viewcontrollers.component.ComponentViewController) ViewController(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController) ExternalComponentViewController(com.reactnativenavigation.viewcontrollers.externalcomponent.ExternalComponentViewController) StackPresenter(com.reactnativenavigation.viewcontrollers.stack.StackPresenter) BottomTabPresenter(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabPresenter) BottomTabsPresenter(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsPresenter) SideMenuPresenter(com.reactnativenavigation.viewcontrollers.sidemenu.SideMenuPresenter) Presenter(com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter) ExternalComponentPresenter(com.reactnativenavigation.viewcontrollers.externalcomponent.ExternalComponentPresenter) ComponentPresenter(com.reactnativenavigation.viewcontrollers.component.ComponentPresenter) ArrayList(java.util.ArrayList) TopTabsController(com.reactnativenavigation.viewcontrollers.toptabs.TopTabsController)

Aggregations

BottomTabPresenter (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabPresenter)1 BottomTabsPresenter (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsPresenter)1 ComponentPresenter (com.reactnativenavigation.viewcontrollers.component.ComponentPresenter)1 ComponentViewController (com.reactnativenavigation.viewcontrollers.component.ComponentViewController)1 ExternalComponentPresenter (com.reactnativenavigation.viewcontrollers.externalcomponent.ExternalComponentPresenter)1 ExternalComponentViewController (com.reactnativenavigation.viewcontrollers.externalcomponent.ExternalComponentViewController)1 SideMenuPresenter (com.reactnativenavigation.viewcontrollers.sidemenu.SideMenuPresenter)1 StackPresenter (com.reactnativenavigation.viewcontrollers.stack.StackPresenter)1 TopTabsController (com.reactnativenavigation.viewcontrollers.toptabs.TopTabsController)1 Presenter (com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter)1 ViewController (com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController)1 TopTabsLayoutCreator (com.reactnativenavigation.views.toptabs.TopTabsLayoutCreator)1 ArrayList (java.util.ArrayList)1