mirror of
https://github.com/status-im/react-native.git
synced 2025-03-01 01:20:31 +00:00
Modal statusbar cleanup
Summary: The hack for the status bar height is not necessary any longer, so we can remove all code related to it Reviewed By: lexs Differential Revision: D3943770 fbshipit-source-id: 2d70f4ea10dd76ea6e6a73bb6edccae388bde1c0
This commit is contained in:
parent
12a97e1ecd
commit
9b261dbc94
@ -233,7 +233,7 @@ public class MainReactPackage extends LazyReactPackage {
|
|||||||
new ReactDropdownPickerManager(),
|
new ReactDropdownPickerManager(),
|
||||||
new ReactHorizontalScrollViewManager(),
|
new ReactHorizontalScrollViewManager(),
|
||||||
new ReactImageManager(),
|
new ReactImageManager(),
|
||||||
new ReactModalHostManager(reactContext),
|
new ReactModalHostManager(),
|
||||||
new ReactProgressBarViewManager(),
|
new ReactProgressBarViewManager(),
|
||||||
new ReactRawTextManager(),
|
new ReactRawTextManager(),
|
||||||
new ReactScrollViewManager(),
|
new ReactScrollViewManager(),
|
||||||
|
@ -9,16 +9,12 @@
|
|||||||
|
|
||||||
package com.facebook.react.views.modal;
|
package com.facebook.react.views.modal;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
|
||||||
import com.facebook.react.common.MapBuilder;
|
import com.facebook.react.common.MapBuilder;
|
||||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||||
import com.facebook.react.uimanager.PixelUtil;
|
|
||||||
import com.facebook.react.uimanager.ThemedReactContext;
|
import com.facebook.react.uimanager.ThemedReactContext;
|
||||||
import com.facebook.react.uimanager.UIManagerModule;
|
import com.facebook.react.uimanager.UIManagerModule;
|
||||||
import com.facebook.react.uimanager.ViewGroupManager;
|
import com.facebook.react.uimanager.ViewGroupManager;
|
||||||
@ -32,12 +28,6 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
|
|||||||
|
|
||||||
private static final String REACT_CLASS = "RCTModalHostView";
|
private static final String REACT_CLASS = "RCTModalHostView";
|
||||||
|
|
||||||
private final ReactApplicationContext mContext;
|
|
||||||
|
|
||||||
public ReactModalHostManager(ReactApplicationContext context) {
|
|
||||||
mContext = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return REACT_CLASS;
|
return REACT_CLASS;
|
||||||
@ -104,17 +94,6 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable Map<String, Object> getExportedViewConstants() {
|
|
||||||
final int heightResId = mContext.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
|
||||||
final float height = heightResId > 0 ?
|
|
||||||
PixelUtil.toDIPFromPixel(mContext.getResources().getDimensionPixelSize(heightResId)) :
|
|
||||||
0;
|
|
||||||
|
|
||||||
return MapBuilder.<String, Object>of(
|
|
||||||
"StatusBarHeight", height);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onAfterUpdateTransaction(ReactModalHostView view) {
|
protected void onAfterUpdateTransaction(ReactModalHostView view) {
|
||||||
super.onAfterUpdateTransaction(view);
|
super.onAfterUpdateTransaction(view);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user