@Override public AttributeResource getAttrValue(ResName resName) { for (StyleData style : styles) { AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } int initialSize = styles.size(); while (hasParent(styles.get(styles.size() - 1))) { StyleData parent = getParent(styles.get(styles.size() - 1)); if (parent != null) { styles.add(parent); } else { break; } } for (int i = initialSize; i < styles.size(); i++) { StyleData style = styles.get(i); AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } // todo: is this tested? if (theme != null) { AttributeResource value = theme.getAttrValue(resName); if (value != null) return value; } return null; }
@Override public AttributeResource getAttrValue(ResName resName) { for (StyleData style : styles) { AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } int initialSize = styles.size(); while (hasParent(styles.get(styles.size() - 1))) { StyleData parent = getParent(styles.get(styles.size() - 1)); if (parent != null) { styles.add(parent); } else { break; } } for (int i = initialSize; i < styles.size(); i++) { StyleData style = styles.get(i); AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } // todo: is this tested? if (theme != null) { AttributeResource value = theme.getAttrValue(resName); if (value != null) return value; } return null; }
@Override public AttributeResource getAttrValue(ResName resName) { for (StyleData style : styles) { AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } int initialSize = styles.size(); while (hasParent(styles.get(styles.size() - 1))) { StyleData parent = getParent(styles.get(styles.size() - 1)); if (parent != null) { styles.add(parent); } else { break; } } for (int i = initialSize; i < styles.size(); i++) { StyleData style = styles.get(i); AttributeResource value = style.getAttrValue(resName); if (value != null) return value; } // todo: is this tested? if (theme != null) { AttributeResource value = theme.getAttrValue(resName); if (value != null) return value; } return null; }