Add interface for ReactShadowNode

Reviewed By: AaaChiuuu

Differential Revision: D5871546

fbshipit-source-id: 7c338fe3b747a79377a54867c789028d221b3dd5
This commit is contained in:
Andrew Chen (Eng)
2017-09-20 08:40:39 -07:00
committed by Facebook Github Bot
parent 6334ed2ff3
commit 08befb730b
16 changed files with 1277 additions and 873 deletions

View File

@@ -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);