Skip to content

Commit

Permalink
add color support
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianTerhorst committed Jun 10, 2016
1 parent 1cd38f1 commit ce34abf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public LayoutAttribute onConvertLayoutAttributeValue(String attributeValue, Stri
return onConvertLayoutAttribute(attribute, attributeName, false);
} else if (attribute.endsWith("sp") && isNumber(attribute.replace("sp", ""))) {
return onConvertLayoutAttribute(attribute, "LayoutUtils.convertSpToPixel(" + attribute.replace("sp", "f") + ", getContext())", attributeName, false);
} else if (attribute.startsWith("#")) {
//Todo : #999 isn´t working or #000
return onConvertLayoutAttribute(attribute, "android.graphics.Color.parseColor(\"" + attribute + "\")", attributeName, false);
} else if (isNumber(attribute)) {
return onConvertLayoutAttribute(attributeValue, attributeName, false);
}
Expand Down

0 comments on commit ce34abf

Please sign in to comment.