use of com.reactnativenavigation.viewcontrollers.navigator.Navigator in project react-native-navigation by wix.
the class NavigationActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isFinishing()) {
return;
}
addDefaultSplashLayout();
navigator = new Navigator(this, new ChildControllersRegistry(), new ModalStack(this), new OverlayManager(), new RootPresenter());
navigator.bindViews();
getReactGateway().onActivityCreated(this);
}
use of com.reactnativenavigation.viewcontrollers.navigator.Navigator in project react-native-navigation by wix.
the class Presenter method applyBackgroundColor.
private void applyBackgroundColor(ViewController view, Options options) {
if (options.layout.backgroundColor.hasValue()) {
if (view instanceof Navigator)
return;
LayerDrawable ld = new LayerDrawable(new Drawable[] { new ColorDrawable(options.layout.backgroundColor.get()) });
int top = view.resolveCurrentOptions().statusBar.drawBehind.isTrue() ? 0 : SystemUiUtils.getStatusBarHeight(view.getActivity());
if (!(view instanceof ParentController)) {
MarginLayoutParams lp = (MarginLayoutParams) view.getView().getLayoutParams();
if (lp.topMargin != 0)
top = 0;
}
ld.setLayerInset(0, 0, top, 0, 0);
view.getView().setBackground(ld);
}
}
Aggregations