Code example for Node

Methods: getTextContent

0
        return resourceName == null ? -1 : colorResolver.getValue(resourceName);
    } 
 
    @Override 
    protected void processNode(Node node, String name, boolean isSystem) {
        colorResolver.processResource(name, node.getTextContent(), this, isSystem);
    } 
 
    @Override 
    public Integer convertRawValue(String rawValue) {
        if (rawValue.startsWith("#")) {
            long color = Long.parseLong(rawValue.substring(1), 16);
            return (int) color;
        } else if (androidColors.containsKey(rawValue)) {
            return androidColors.get(rawValue);
        } 
        return null; 
    } 
}