mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
d269844cc1
commit
6570f7887b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user