use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class ComponentOptions method reset.
public void reset() {
name = new NullText();
componentId = new NullText();
alignment = Alignment.Default;
waitForRender = new NullBool();
width = new NullNumber();
height = new NullNumber();
}
use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class OptionsTest method mergeDoesNotMutate.
@Test
public void mergeDoesNotMutate() throws Exception {
JSONObject json1 = new JSONObject();
json1.put("topBar", createTopBar(true));
Options options1 = Options.parse(activity, mockLoader, json1);
options1.topBar.title.text = new Text("some title");
JSONObject json2 = new JSONObject();
json2.put("topBar", createTopBar(false));
Options options2 = Options.parse(activity, mockLoader, json2);
options2.topBar.title.text = new NullText();
Options merged = options1.mergeWith(options2);
assertThat(options1.topBar.visible.get()).isTrue();
assertThat(merged.topBar.visible.get()).isFalse();
assertThat(merged.topBar.title.text.get()).isEqualTo("some title");
}
use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class TopBarButtonControllerTest method setIconButton.
private void setIconButton(boolean enabled) {
button.id = "btn1";
button.icon = new Text("someIcon");
button.color = new ThemeColour(new Colour(Color.RED), new Colour(Color.RED));
button.component.name = new NullText();
button.component.componentId = new NullText();
button.enabled = new Bool(enabled);
button.showAsAction = new Number(MenuItem.SHOW_AS_ACTION_ALWAYS);
}
use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class TopBarOptions method validate.
public void validate() {
if (title.component.hasValue() && (title.text.hasValue() || subtitle.text.hasValue())) {
if (BuildConfig.DEBUG)
Log.w("RNN", "A screen can't use both text and component - clearing text.");
title.text = new NullText();
subtitle.text = new NullText();
}
}
use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class BottomTabsOptions method clearOneTimeOptions.
public void clearOneTimeOptions() {
currentTabId = new NullText();
currentTabIndex = new NullNumber();
}
Aggregations