Search in sources :

Example 1 with ImageLoader

use of com.reactnativenavigation.utils.ImageLoader in project react-native-navigation by wix.

the class TestUtils method newStackController.

public static StackControllerBuilder newStackController(Activity activity) {
    TopBarController topBarController = new TopBarController() {

        @Override
        protected TopBar createTopBar(@NonNull Context context, @NonNull StackLayout stackLayout) {
            TopBar topBar = super.createTopBar(context, stackLayout);
            topBar.layout(0, 0, 1000, UiUtils.getTopBarHeight(context));
            return topBar;
        }
    };
    return new StackControllerBuilder(activity, Mockito.mock(EventEmitter.class)).setId("stack" + CompatUtils.generateViewId()).setChildRegistry(new ChildControllersRegistry()).setTopBarController(topBarController).setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarBackgroundViewCreatorMock(), new TitleBarButtonCreatorMock(), new IconResolver(activity, new ImageLoader()), new TypefaceLoaderMock(), new RenderChecker(), new Options())).setInitialOptions(new Options());
}
Also used : Context(android.content.Context) Options(com.reactnativenavigation.options.Options) IconResolver(com.reactnativenavigation.viewcontrollers.stack.topbar.button.IconResolver) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry) TitleBarButtonCreatorMock(com.reactnativenavigation.mocks.TitleBarButtonCreatorMock) TypefaceLoaderMock(com.reactnativenavigation.mocks.TypefaceLoaderMock) TopBarBackgroundViewCreatorMock(com.reactnativenavigation.mocks.TopBarBackgroundViewCreatorMock) TitleBarReactViewCreatorMock(com.reactnativenavigation.mocks.TitleBarReactViewCreatorMock) NonNull(androidx.annotation.NonNull) StackLayout(com.reactnativenavigation.views.stack.StackLayout) StackPresenter(com.reactnativenavigation.viewcontrollers.stack.StackPresenter) TopBar(com.reactnativenavigation.views.stack.topbar.TopBar) StackControllerBuilder(com.reactnativenavigation.viewcontrollers.stack.StackControllerBuilder) ImageLoader(com.reactnativenavigation.utils.ImageLoader) TopBarController(com.reactnativenavigation.viewcontrollers.stack.topbar.TopBarController) RenderChecker(com.reactnativenavigation.utils.RenderChecker)

Example 2 with ImageLoader

use of com.reactnativenavigation.utils.ImageLoader 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

ImageLoader (com.reactnativenavigation.utils.ImageLoader)2 StackPresenter (com.reactnativenavigation.viewcontrollers.stack.StackPresenter)2 Context (android.content.Context)1 NonNull (androidx.annotation.NonNull)1 TitleBarButtonCreatorMock (com.reactnativenavigation.mocks.TitleBarButtonCreatorMock)1 TitleBarReactViewCreatorMock (com.reactnativenavigation.mocks.TitleBarReactViewCreatorMock)1 TopBarBackgroundViewCreatorMock (com.reactnativenavigation.mocks.TopBarBackgroundViewCreatorMock)1 TypefaceLoaderMock (com.reactnativenavigation.mocks.TypefaceLoaderMock)1 Options (com.reactnativenavigation.options.Options)1 TypefaceLoader (com.reactnativenavigation.options.parsers.TypefaceLoader)1 RenderChecker (com.reactnativenavigation.utils.RenderChecker)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 BottomTabsAttacher (com.reactnativenavigation.viewcontrollers.bottomtabs.attacher.BottomTabsAttacher)1 ChildControllersRegistry (com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)1 ComponentPresenter (com.reactnativenavigation.viewcontrollers.component.ComponentPresenter)1 ComponentViewController (com.reactnativenavigation.viewcontrollers.component.ComponentViewController)1 ExternalComponentPresenter (com.reactnativenavigation.viewcontrollers.externalcomponent.ExternalComponentPresenter)1