diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java index 21582f3cc..6ae5a472d 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java @@ -319,6 +319,19 @@ public class CSSNode implements CSSNodeAPI { } } + @Override + public CSSAlign getAlignContent() { + return style.alignContent; + } + + @Override + public void setAlignContent(CSSAlign alignContent) { + if (style.alignContent != alignContent) { + style.alignContent = alignContent; + dirty(); + } + } + /** * Get this node's position type, as defined by style. */ diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeAPI.java b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeAPI.java index 7cd418c96..aa2dc030a 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeAPI.java +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeAPI.java @@ -47,6 +47,8 @@ public interface CSSNodeAPI { void setAlignItems(CSSAlign alignItems); CSSAlign getAlignSelf(); void setAlignSelf(CSSAlign alignSelf); + CSSAlign getAlignContent(); + void setAlignContent(CSSAlign alignContent); CSSPositionType getPositionType(); void setPositionType(CSSPositionType positionType); void setWrap(CSSWrap flexWrap); diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeJNI.java b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeJNI.java index 676729a92..90c8e982f 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeJNI.java +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeJNI.java @@ -230,6 +230,20 @@ public class CSSNodeJNI implements CSSNodeAPI { jni_CSSNodeStyleSetAlignSelf(mNativePointer, alignSelf.ordinal()); } + private native int jni_CSSNodeStyleGetAlignContent(int nativePointer); + @Override + public CSSAlign getAlignContent() { + assertNativeInstance(); + return CSSAlign.values()[jni_CSSNodeStyleGetAlignContent(mNativePointer)]; + } + + private native void jni_CSSNodeStyleSetAlignContent(int nativePointer, int alignContent); + @Override + public void setAlignContent(CSSAlign alignContent) { + assertNativeInstance(); + jni_CSSNodeStyleSetAlignContent(mNativePointer, alignContent.ordinal()); + } + private native int jni_CSSNodeStyleGetPositionType(int nativePointer); @Override public CSSPositionType getPositionType() {