Extend ReactShadowNode API to expose flex props

Summary:
This diff extends the ReactShadowNode API to expose flex props, this is going to be used by some components that require access to it

changeLog: [Android][Added] Exposed getFlex method as part of ReactShadowNode API

Reviewed By: JoshuaGross

Differential Revision: D21554663

fbshipit-source-id: 26c9a3fe5f72a84120b16b553ab08231817c0efa
This commit is contained in:
David Vacca
2020-05-13 15:44:24 -07:00
committed by Facebook GitHub Bot
parent d269844cc1
commit 6570f7887b
2 changed files with 7 additions and 0 deletions
@@ -288,6 +288,8 @@ public interface ReactShadowNode<T extends ReactShadowNode> {
YogaValue getStyleHeight();
float getFlex();
void setStyleHeight(float heightPx);
void setStyleHeightPercent(float percent);
@@ -779,6 +779,11 @@ public class ReactShadowNodeImpl implements ReactShadowNode<ReactShadowNodeImpl>
mYogaNode.setMaxHeightPercent(percent);
}
@Override
public float getFlex() {
return mYogaNode.getFlex();
}
@Override
public void setFlex(float flex) {
mYogaNode.setFlex(flex);