Search in sources :

Example 26 with Bool

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

the class SideMenuControllerTest method closeRightMenu.

private void closeRightMenu() {
    Options options = new Options();
    options.sideMenuRootOptions.right.visible = new Bool(false);
    options.sideMenuRootOptions.right.animate = new Bool(false);
    uut.mergeOptions(options);
    uut.onDrawerSlide(right.getView(), 0);
}
Also used : SideMenuOptions(com.reactnativenavigation.options.SideMenuOptions) Options(com.reactnativenavigation.options.Options) Bool(com.reactnativenavigation.options.params.Bool)

Example 27 with Bool

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

the class BackButton method setVisible.

public void setVisible() {
    visible = new Bool(true);
    hasValue = true;
}
Also used : NullBool(com.reactnativenavigation.options.params.NullBool) Bool(com.reactnativenavigation.options.params.Bool)

Example 28 with Bool

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

the class BackButton method setHidden.

public void setHidden() {
    visible = new Bool(false);
    hasValue = true;
}
Also used : NullBool(com.reactnativenavigation.options.params.NullBool) Bool(com.reactnativenavigation.options.params.Bool)

Example 29 with Bool

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

the class BackButtonHelperTest method addToChild_doesNotAddIfBackButtonHidden.

@Test
public void addToChild_doesNotAddIfBackButtonHidden() {
    disablePushAnimation(child1, child2);
    stack.push(child1, new CommandListenerAdapter());
    child2.options.topBar.buttons.back.visible = new Bool(false);
    stack.push(child2, new CommandListenerAdapter());
    verify(child2, times(0)).mergeOptions(any());
}
Also used : Bool(com.reactnativenavigation.options.params.Bool) CommandListenerAdapter(com.reactnativenavigation.react.CommandListenerAdapter) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Example 30 with Bool

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

the class ButtonPresenterTest method apply_disabledColor.

@Test
public void apply_disabledColor() {
    button.enabled = new Bool(false);
    addButtonAndApplyOptions();
    assertThat(findButtonView().getCurrentTextColor()).isEqualTo(ButtonPresenter.DISABLED_COLOR);
}
Also used : Bool(com.reactnativenavigation.options.params.Bool) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Aggregations

Bool (com.reactnativenavigation.options.params.Bool)40 BaseTest (com.reactnativenavigation.BaseTest)29 Test (org.junit.Test)29 Options (com.reactnativenavigation.options.Options)14 SideMenuOptions (com.reactnativenavigation.options.SideMenuOptions)10 CommandListenerAdapter (com.reactnativenavigation.react.CommandListenerAdapter)7 Colour (com.reactnativenavigation.options.params.Colour)6 Text (com.reactnativenavigation.options.params.Text)6 ThemeColour (com.reactnativenavigation.options.params.ThemeColour)6 MenuItem (android.view.MenuItem)5 PorterDuffColorFilter (android.graphics.PorterDuffColorFilter)4 Drawable (android.graphics.drawable.Drawable)4 NullBool (com.reactnativenavigation.options.params.NullBool)4 IconBackgroundDrawable (com.reactnativenavigation.views.stack.topbar.titlebar.IconBackgroundDrawable)4 ViewGroup (android.view.ViewGroup)3 StackController (com.reactnativenavigation.viewcontrollers.stack.StackController)3 SimpleComponentViewController (com.reactnativenavigation.mocks.SimpleComponentViewController)2 IconBackgroundOptions (com.reactnativenavigation.options.IconBackgroundOptions)2 View (android.view.View)1 FrameLayout (android.widget.FrameLayout)1