Java Code Examples for com.facebook.react.uimanager.ReactShadowNodeImpl#setStyleHeight()

The following examples show how to use com.facebook.react.uimanager.ReactShadowNodeImpl#setStyleHeight() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TranslucentModalHostShadowNode.java    From react-native-modal-translucent with MIT License 5 votes vote down vote up
@Override
public void addChildAt(ReactShadowNodeImpl child, int i) {
    super.addChildAt(child, i);
    Point modalSize = TranslucentModalHostHelper.getModalHostSize(getThemedContext());
    child.setStyleWidth(modalSize.x);
    child.setStyleHeight(modalSize.y);
}
 
Example 2
Source File: ModalHostShadowNode.java    From react-native-GPay with MIT License 5 votes vote down vote up
/**
 * 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.
 */
@Override
public void addChildAt(ReactShadowNodeImpl child, int i) {
  super.addChildAt(child, i);
  Point modalSize = ModalHostHelper.getModalHostSize(getThemedContext());
  child.setStyleWidth(modalSize.x);
  child.setStyleHeight(modalSize.y);
}