|
@@ -49,11 +49,12 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
49
|
49
|
|
50
|
50
|
@ReactMethod
|
51
|
51
|
public void getConstants(Promise promise) {
|
|
52
|
+ ReactApplicationContext ctx = getReactApplicationContext();
|
52
|
53
|
WritableMap constants = Arguments.createMap();
|
53
|
|
- constants.putString(Constants.BACK_BUTTON_JS_KEY, Constants.BACK_BUTTON_ID);
|
54
|
|
- constants.putDouble(Constants.STATUS_BAR_HEIGHT_KEY, UiUtils.getStatusBarHeight(getReactApplicationContext()));
|
55
|
|
- constants.putDouble(Constants.TOP_BAR_HEIGHT_KEY, UiUtils.getToolBarHeight(getReactApplicationContext()));
|
56
|
|
- constants.putDouble(Constants.TOP_BAR_HEIGHT_KEY, UiUtils.dpToPx(getReactApplicationContext(), Constants.BOTTOM_TABS_HEIGHT));
|
|
54
|
+ constants.putString(Constants.BACK_BUTTON_JS_KEY, Constants.BACK_BUTTON_ID);
|
|
55
|
+ constants.putDouble(Constants.TOP_BAR_HEIGHT_KEY, Constants.BOTTOM_TABS_HEIGHT);
|
|
56
|
+ constants.putDouble(Constants.STATUS_BAR_HEIGHT_KEY, UiUtils.pxToDp(ctx, UiUtils.getStatusBarHeight(ctx)));
|
|
57
|
+ constants.putDouble(Constants.TOP_BAR_HEIGHT_KEY, UiUtils.pxToDp(ctx, UiUtils.getToolBarHeight(ctx)));
|
57
|
58
|
promise.resolve(constants);
|
58
|
59
|
}
|
59
|
60
|
|