private void updateProperties() { updateMargin(); borderStyle = (BorderStyle)attr.getAttribute(CSS.Attribute.BORDER_STYLE); if (borderStyle != null) { borderColor = (BorderColor)attr.getAttribute(CSS.Attribute.BORDER_COLOR); updateBorderWidth(); } backgroundImage = (CSS.ImageValue)attr.getAttribute(CSS.Attribute .BACKGROUND_IMAGE); backgroundRepeat = backgroundImage == null ? null : (CSS.BackgroundRepeat)attr.getAttribute(CSS.Attribute .BACKGROUND_REPEAT); backgroundColor = (CSS.ColorProperty)attr.getAttribute(CSS.Attribute .BACKGROUND_COLOR); }
private float getBorderSideWidth(final int side, final View view) { final AttributeSet viewAttr = view.getAttributes(); CSS.BorderStyle borderStyle = (BorderStyle)viewAttr.getAttribute(CSS.Attribute.BORDER_STYLE); if (borderStyle == null || borderStyle.getSideStyle(side).getIndex() == CSS.BorderStyleValue.NONE) { return 0; } return getBorderSideWidth(side, view, viewAttr); }