mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 03:13:52 +08:00
Add interface for ReactShadowNode
Reviewed By: AaaChiuuu Differential Revision: D5871546 fbshipit-source-id: 7c338fe3b747a79377a54867c789028d221b3dd5
This commit is contained in:
committed by
Facebook Github Bot
parent
6334ed2ff3
commit
08befb730b
@@ -10,9 +10,8 @@
|
||||
package com.facebook.react.views.modal;
|
||||
|
||||
import android.graphics.Point;
|
||||
|
||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
|
||||
/**
|
||||
* We implement the Modal by using an Android Dialog. That will fill the entire window of the
|
||||
@@ -26,10 +25,10 @@ class ModalHostShadowNode extends LayoutShadowNode {
|
||||
|
||||
/**
|
||||
* We need to set the styleWidth and styleHeight of the one child (represented by the <View/>
|
||||
* within the <RCTModalHostView/> in Modal.js. This needs to fill the entire window.
|
||||
* within the <RCTModalHostView/> in Modal.js. This needs to fill the entire window.
|
||||
*/
|
||||
@Override
|
||||
public void addChildAt(ReactShadowNode child, int i) {
|
||||
public void addChildAt(ReactShadowNodeImpl child, int i) {
|
||||
super.addChildAt(child, i);
|
||||
Point modalSize = ModalHostHelper.getModalHostSize(getThemedContext());
|
||||
child.setStyleWidth(modalSize.x);
|
||||
|
||||
Reference in New Issue
Block a user