Java 类com.facebook.csslayout.CSSWrap 实例源码

项目:LuaViewPlayground    文件:FlexboxCSSParser.java   
private static void setFlexWrap() {
    String flexWrap = mInlineMap.get(FLEXWRAP);
    if (flexWrap != null) {
        CSSWrap ifWrap = Integer.parseInt(flexWrap) > 0 ? CSSWrap.WRAP : CSSWrap.NOWRAP;
        mNode.setWrap(ifWrap);
    }
}
项目:CSSLayout    文件:CSSLayout.java   
public void clear() {
    style.direction = CSSDirection.INHERIT;
    style.flexDirection = CSSFlexDirection.COLUMN;
    style.justifyContent = CSSJustify.FLEX_START;
    style.alignContent = CSSAlign.FLEX_START;
    style.alignItems = CSSAlign.STRETCH;
    style.alignSelf = CSSAlign.AUTO;
    style.positionType = CSSPositionType.RELATIVE;
    style.flexWrap = CSSWrap.NOWRAP;
    style.flex = 0;

    style.margin = new Spacing();
    style.padding = new Spacing();
    style.border = new Spacing();

    style.positionTop = CSSConstants.UNDEFINED;
    style.positionBottom = CSSConstants.UNDEFINED;
    style.positionLeft = CSSConstants.UNDEFINED;
    style.positionRight = CSSConstants.UNDEFINED;

    style.width = CSSConstants.UNDEFINED;
    style.height = CSSConstants.UNDEFINED;

    style.minWidth = CSSConstants.UNDEFINED;
    style.minHeight = CSSConstants.UNDEFINED;

    style.maxWidth = CSSConstants.UNDEFINED;
    style.maxHeight = CSSConstants.UNDEFINED;
}
项目:ReactNativeSignatureExample    文件:LayoutShadowNode.java   
@ReactProp(name = ViewProps.FLEX_WRAP)
public void setFlexWrap(@Nullable String flexWrap) {
  setWrap(flexWrap == null ? CSSWrap.NOWRAP : CSSWrap.valueOf(flexWrap.toUpperCase(Locale.US)));
}
项目:react-native-ibeacon-android    文件:LayoutShadowNode.java   
@ReactProp(name = ViewProps.FLEX_WRAP)
public void setFlexWrap(@Nullable String flexWrap) {
  setWrap(flexWrap == null ? CSSWrap.NOWRAP : CSSWrap.valueOf(flexWrap.toUpperCase(Locale.US)));
}
项目:react-native-box-loaders    文件:LayoutShadowNode.java   
@ReactProp(name = ViewProps.FLEX_WRAP)
public void setFlexWrap(@Nullable String flexWrap) {
  setWrap(flexWrap == null ? CSSWrap.NOWRAP : CSSWrap.valueOf(flexWrap.toUpperCase(Locale.US)));
}
项目:Ironman    文件:LayoutShadowNode.java   
@ReactProp(name = ViewProps.FLEX_WRAP)
public void setFlexWrap(@Nullable String flexWrap) {
  setWrap(flexWrap == null ? CSSWrap.NOWRAP : CSSWrap.valueOf(flexWrap.toUpperCase(Locale.US)));
}
项目:CSSLayout    文件:CSSLayout.java   
private void parseCssAttribute(Context context, AttributeSet attrs) {
    TypedArray a = context.obtainStyledAttributes(attrs,
            R.styleable.CSSLayout);

    final int N = a.getIndexCount();
    for (int i = 0; i < N; i++) {
        int attr = a.getIndex(i);
        switch (attr) {
            case R.styleable.CSSLayout_direction:
                setDirection(getEnum(a.getInt(attr, 0), CSSDirection.class));
                break;
            case R.styleable.CSSLayout_flexDirection:
                setFlexDirection(getEnum(a.getInt(attr, 0), CSSFlexDirection.class));
                break;
            case R.styleable.CSSLayout_justifyContent:
                setJustifyContent(getEnum(a.getInt(attr, 0), CSSJustify.class));
                break;
            case R.styleable.CSSLayout_alignContent:
                setAlignContent(getEnum(a.getInt(attr, 0), CSSAlign.class));
                break;
            case R.styleable.CSSLayout_alignItems:
                setAlignItems(getEnum(a.getInt(attr, 0), CSSAlign.class));
                break;
            case R.styleable.CSSLayout_flexWrap:
                setFlexWrap(getEnum(a.getInt(attr, 0), CSSWrap.class));
                break;

            case R.styleable.CSSLayout_padding:
                setPadding(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_paddingLeft:
                setPaddingLeft(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_paddingRight:
                setPaddingRight(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_paddingTop:
                setPaddingTop(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_paddingBottom:
                setPaddingBottom(a.getDimension(attr, 0));
                break;


            case R.styleable.CSSLayout_borderWidth:
                setBorderWidth(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_borderLeftWidth:
                setBorderLeftWidth(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_borderRightWidth:
                setBorderRightWidth(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_borderTopWidth:
                setBorderTopWidth(a.getDimension(attr, 0));
                break;
            case R.styleable.CSSLayout_borderBottomWidth:
                setBorderBottomWidth(a.getDimension(attr, 0));
                break;
        }
    }
    a.recycle();
}
项目:CSSLayout    文件:CSSLayout.java   
public void setFlexWrap(CSSWrap flexWrap) {
    mCSSNode.setWrap(flexWrap);
    requestLayoutWhithoutDirty();
}