Expose alignContent to java

Reviewed By: IanChilds

Differential Revision: D3709071

fbshipit-source-id: 421d75924ecc12d6d0975e342f3862cf5592f65f
This commit is contained in:
Emil Sjolander 2016-08-12 04:17:36 -07:00 committed by Facebook Github Bot 3
parent ce2f119222
commit c2a41e42f2
3 changed files with 29 additions and 0 deletions

View File

@ -319,6 +319,19 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
}
}
@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.
*/

View File

@ -47,6 +47,8 @@ public interface CSSNodeAPI<CSSNodeType extends 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);

View File

@ -230,6 +230,20 @@ public class CSSNodeJNI implements CSSNodeAPI<CSSNodeJNI> {
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() {