Search in sources :

Example 1 with ExternalComponentLayout

use of com.reactnativenavigation.views.ExternalComponentLayout in project react-native-navigation by wix.

the class ExternalComponentViewController method createView.

@Override
public ExternalComponentLayout createView() {
    ExternalComponentLayout content = new ExternalComponentLayout(getActivity());
    enableDrawingBehindStatusBar(content);
    content.addView(componentCreator.create(getActivity(), reactInstanceManager, externalComponent.passProps).asView(), CoordinatorLayoutUtils.matchParentWithBehaviour(new BehaviourDelegate(this)));
    return content;
}
Also used : BehaviourDelegate(com.reactnativenavigation.views.BehaviourDelegate) ExternalComponentLayout(com.reactnativenavigation.views.ExternalComponentLayout)

Example 2 with ExternalComponentLayout

use of com.reactnativenavigation.views.ExternalComponentLayout in project react-native-navigation by wix.

the class ExternalComponentViewControllerTest method createView_returnsFrameLayout.

@Test
public void createView_returnsFrameLayout() {
    ExternalComponentLayout view = uut.getView();
    assertThat(CoordinatorLayout.class.isAssignableFrom(view.getClass())).isTrue();
}
Also used : ExternalComponentLayout(com.reactnativenavigation.views.ExternalComponentLayout) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Example 3 with ExternalComponentLayout

use of com.reactnativenavigation.views.ExternalComponentLayout in project react-native-navigation by wix.

the class ExternalComponentViewControllerTest method createView_createsExternalComponent.

@Test
public void createView_createsExternalComponent() {
    ExternalComponentLayout view = uut.getView();
    verify(componentCreator, times(1)).create((FragmentActivity) activity, reactInstanceManager, ec.passProps);
    assertThat(view.getChildCount()).isGreaterThan(0);
}
Also used : ExternalComponentLayout(com.reactnativenavigation.views.ExternalComponentLayout) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Aggregations

ExternalComponentLayout (com.reactnativenavigation.views.ExternalComponentLayout)3 BaseTest (com.reactnativenavigation.BaseTest)2 Test (org.junit.Test)2 BehaviourDelegate (com.reactnativenavigation.views.BehaviourDelegate)1