use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class TitleBarHelper method titleComponent.
public static ComponentOptions titleComponent(String componentId) {
ComponentOptions component = new ComponentOptions();
component.componentId = new Text(componentId);
component.name = new Text(componentId);
return component;
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class TitleBarHelper method iconButton.
public static ButtonOptions iconButton(String id, String icon) {
ButtonOptions button = new ButtonOptions();
button.id = "someButton";
button.icon = new Text(icon);
return button;
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class OptionsApplyingTest method reappliesOptionsOnMerge.
@Test
public void reappliesOptionsOnMerge() {
assertThat(stack.getTopBar().getTitle()).isEmpty();
stack.push(uut, new CommandListenerAdapter());
Options opts = new Options();
opts.topBar.title.text = new Text("the new title");
uut.mergeOptions(opts);
assertThat(stack.getTopBar().getTitle()).isEqualTo("the new title");
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class OptionsApplyingTest method mergeNavigationOptionsUpdatesCurrentOptions.
@Test
public void mergeNavigationOptionsUpdatesCurrentOptions() {
assertThat(uut.options.topBar.title.text.get("")).isEmpty();
Options options = new Options();
options.topBar.title.text = new Text("new title");
uut.mergeOptions(options);
assertThat(uut.options.topBar.title.text.get()).isEqualTo("new title");
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class SideMenuControllerTest method resolveCurrentOptions_centerOptionsAreMergedEvenIfDrawerIsOpen.
@Test
public void resolveCurrentOptions_centerOptionsAreMergedEvenIfDrawerIsOpen() {
uut.setLeftController(left);
center.options.topBar.title.text = new Text("Center");
assertThat(uut.resolveCurrentOptions().topBar.title.text.hasValue()).isTrue();
openLeftMenu();
assertThat(uut.resolveCurrentOptions().topBar.title.text.hasValue()).isTrue();
}
Aggregations