@ReactProp(name = ViewProps.JUSTIFY_CONTENT)
public void setJustifyContent(@Nullable String justifyContent) {
if (isVirtual()) {
return;
}
if (justifyContent == null) {
setJustifyContent(YogaJustify.FLEX_START);
return;
}
switch (justifyContent) {
case "flex-start": {
setJustifyContent(YogaJustify.FLEX_START);
break;
}
case "center": {
setJustifyContent(YogaJustify.CENTER);
break;
}
case "flex-end": {
setJustifyContent(YogaJustify.FLEX_END);
break;
}
case "space-between": {
setJustifyContent(YogaJustify.SPACE_BETWEEN);
break;
}
case "space-around": {
setJustifyContent(YogaJustify.SPACE_AROUND);
break;
}
default: {
throw new JSApplicationIllegalArgumentException(
"invalid value for justifyContent: " + justifyContent);
}
}
}
LayoutShadowNode.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:RNLearn_Project1
作者:
评论列表
文章目录