Search in sources :

Example 26 with Text

use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.

the class TopBarButtonControllerTest method setReactComponentButton.

private void setReactComponentButton() {
    button.id = "btnId";
    button.component.name = new Text("com.example.customBtn");
    button.component.componentId = new Text("component666");
}
Also used : Text(com.reactnativenavigation.options.params.Text) NullText(com.reactnativenavigation.options.params.NullText)

Example 27 with Text

use of com.reactnativenavigation.options.params.Text 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;
}
Also used : ButtonOptions(com.reactnativenavigation.options.ButtonOptions) Text(com.reactnativenavigation.options.params.Text) ThemeColour(com.reactnativenavigation.options.params.ThemeColour) Colour(com.reactnativenavigation.options.params.Colour) ThemeColour(com.reactnativenavigation.options.params.ThemeColour)

Example 28 with Text

use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.

the class ExternalComponentViewControllerTest method createExternalComponent.

private ExternalComponent createExternalComponent() {
    ExternalComponent component = new ExternalComponent();
    component.name = new Text("fragmentComponent");
    component.passProps = new JSONObject();
    return component;
}
Also used : JSONObject(org.json.JSONObject) ExternalComponent(com.reactnativenavigation.options.ExternalComponent) Text(com.reactnativenavigation.options.params.Text)

Example 29 with Text

use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.

the class NavigatorTest method mergeOptions_CallsApplyNavigationOptions.

@Test
public void mergeOptions_CallsApplyNavigationOptions() {
    ComponentViewController componentVc = new SimpleComponentViewController(activity, childRegistry, "theId", new Options());
    componentVc.setParentController(parentController);
    assertThat(componentVc.options.topBar.title.text.get("")).isEmpty();
    uut.setRoot(componentVc, new CommandListenerAdapter(), reactInstanceManager);
    Options options = new Options();
    options.topBar.title.text = new Text("new title");
    uut.mergeOptions("theId", options);
    assertThat(componentVc.options.topBar.title.text.get()).isEqualTo("new title");
}
Also used : ModalOptions(com.reactnativenavigation.options.ModalOptions) Options(com.reactnativenavigation.options.Options) SimpleComponentViewController(com.reactnativenavigation.mocks.SimpleComponentViewController) ComponentViewController(com.reactnativenavigation.viewcontrollers.component.ComponentViewController) Text(com.reactnativenavigation.options.params.Text) SimpleComponentViewController(com.reactnativenavigation.mocks.SimpleComponentViewController) CommandListenerAdapter(com.reactnativenavigation.react.CommandListenerAdapter) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Example 30 with Text

use of com.reactnativenavigation.options.params.Text 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;
}
Also used : ButtonOptions(com.reactnativenavigation.options.ButtonOptions) Text(com.reactnativenavigation.options.params.Text)

Aggregations

Text (com.reactnativenavigation.options.params.Text)34 BaseTest (com.reactnativenavigation.BaseTest)16 Test (org.junit.Test)16 Options (com.reactnativenavigation.options.Options)14 Colour (com.reactnativenavigation.options.params.Colour)8 NullText (com.reactnativenavigation.options.params.NullText)8 ThemeColour (com.reactnativenavigation.options.params.ThemeColour)8 ButtonOptions (com.reactnativenavigation.options.ButtonOptions)6 Bool (com.reactnativenavigation.options.params.Bool)6 PorterDuffColorFilter (android.graphics.PorterDuffColorFilter)4 Drawable (android.graphics.drawable.Drawable)4 MenuItem (android.view.MenuItem)4 CommandListenerAdapter (com.reactnativenavigation.react.CommandListenerAdapter)4 IconBackgroundDrawable (com.reactnativenavigation.views.stack.topbar.titlebar.IconBackgroundDrawable)4 NonNull (androidx.annotation.NonNull)3 SimpleViewController (com.reactnativenavigation.mocks.SimpleViewController)3 ComponentOptions (com.reactnativenavigation.options.ComponentOptions)3 NullThemeColour (com.reactnativenavigation.options.params.NullThemeColour)3 FabOptions (com.reactnativenavigation.options.FabOptions)2 IconBackgroundOptions (com.reactnativenavigation.options.IconBackgroundOptions)2