use of com.reactnativenavigation.options.ButtonOptions in project react-native-navigation by wix.
the class TitleBarButtonControllerTest method beforeEach.
@Override
public void beforeEach() {
Activity activity = newActivity();
titleBar = new ButtonBar(activity);
ButtonOptions button = createComponentButton();
uut = new ButtonController(activity, new ButtonPresenter(activity, button, new IconResolver(activity, ImageLoaderMock.mock())), button, new TitleBarButtonCreatorMock(), Mockito.mock(ButtonController.OnClickListener.class));
}
use of com.reactnativenavigation.options.ButtonOptions in project react-native-navigation by wix.
the class TopBarButtonControllerTest method beforeEach.
@Override
public void beforeEach() {
button = new ButtonOptions();
final Activity activity = newActivity();
TitleBarButtonCreatorMock buttonCreatorMock = new TitleBarButtonCreatorMock();
stackController = spy(TestUtils.newStackController(activity).build());
stackController.getView().layout(0, 0, 1080, 1920);
stackController.getTopBar().layout(0, 0, 1080, 200);
getTitleBar().layout(0, 0, 1080, 200);
optionsPresenter = spy(new ButtonPresenter(activity, button, new IconResolverFake(activity, ImageLoaderMock.mock())));
uut = new ButtonController(activity, optionsPresenter, button, buttonCreatorMock, (buttonId) -> {
});
stackController.ensureViewIsCreated();
}
use of com.reactnativenavigation.options.ButtonOptions in project react-native-navigation by wix.
the class NavigationIconResolverTest method iconButton.
private ButtonOptions iconButton() {
ButtonOptions button = new ButtonOptions();
button.id = "iconBtnId";
button.icon = new Text(ICON_URI);
button.color = new ThemeColour(new Colour(Color.RED));
return button;
}
use of com.reactnativenavigation.options.ButtonOptions in project react-native-navigation by wix.
the class TitleBarHelper method textualButton.
public static ButtonOptions textualButton(String text) {
ButtonOptions button = new ButtonOptions();
button.id = text + CompatUtils.generateViewId();
button.text = new Text(text);
return button;
}
use of com.reactnativenavigation.options.ButtonOptions in project react-native-navigation by wix.
the class TitleBarHelper method reactViewButton.
public static ButtonOptions reactViewButton(String name) {
ButtonOptions button = new ButtonOptions();
button.id = name + CompatUtils.generateViewId();
button.component = new ComponentOptions();
button.component.name = new Text("com.example" + name + CompatUtils.generateViewId());
button.component.componentId = new Text(name + CompatUtils.generateViewId());
return button;
}
Aggregations