Search in sources :

Example 1 with BottomTabsAttacher

use of com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher in project react-native-navigation by wix.

the class BottomTabsAttacherTest method beforeEach.

@Override
public void beforeEach() {
    mode = Mockito.mock(AttachMode.class);
    List<ViewController<?>> tabs = Arrays.asList(mock(ViewController.class), mock(ViewController.class));
    uut = new BottomTabsAttacher(tabs, Mockito.mock(BottomTabsPresenter.class), defaultOptions);
    uut.attachStrategy = mode;
}
Also used : TabsAttachMode(com.reactnativenavigation.options.TabsAttachMode) AttachMode(com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.modes.AttachMode) ViewController(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController) BottomTabsAttacher(com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher)

Example 2 with BottomTabsAttacher

use of com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher in project react-native-navigation by wix.

the class LayoutFactory method createBottomTabs.

private ViewController<?> createBottomTabs(LayoutNode node) {
    List<ViewController<?>> tabs = map(node.children, this::create);
    BottomTabsPresenter bottomTabsPresenter = new BottomTabsPresenter(tabs, defaultOptions, new BottomTabsAnimator());
    return new BottomTabsController(activity, tabs, childRegistry, eventEmitter, new ImageLoader(), node.id, parseOptions(node.getOptions()), new Presenter(activity, defaultOptions), new BottomTabsAttacher(tabs, bottomTabsPresenter, defaultOptions), bottomTabsPresenter, new BottomTabPresenter(activity, tabs, new ImageLoader(), new TypefaceLoader(activity), defaultOptions));
}
Also used : BottomTabsController(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsController) BottomTabPresenter(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabPresenter) 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) TypefaceLoader(com.reactnativenavigation.options.parsers.TypefaceLoader) BottomTabsPresenter(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsPresenter) BottomTabsAttacher(com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher) ImageLoader(com.reactnativenavigation.utils.ImageLoader) BottomTabsAnimator(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsAnimator)

Aggregations

BottomTabsAttacher (com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher)2 ViewController (com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController)2 TabsAttachMode (com.reactnativenavigation.options.TabsAttachMode)1 TypefaceLoader (com.reactnativenavigation.options.parsers.TypefaceLoader)1 ImageLoader (com.reactnativenavigation.utils.ImageLoader)1 BottomTabPresenter (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabPresenter)1 BottomTabsAnimator (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsAnimator)1 BottomTabsController (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsController)1 BottomTabsPresenter (com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsPresenter)1 AttachMode (com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.modes.AttachMode)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 Presenter (com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter)1