private void computeStyleInheritance(Collection<ResourceValue> styles,
Map<String, ResourceValue> inProjectStyleMap,
Map<String, ResourceValue> inFrameworkStyleMap) {
for (ResourceValue value : styles) {
if (value instanceof StyleResourceValue) {
StyleResourceValue style = (StyleResourceValue)value;
// first look for a specified parent.
String parentName = style.getParentStyle();
// no specified parent? try to infer it from the name of the style.
if (parentName == null) {
parentName = getParentName(value.getName());
}
if (parentName != null) {
StyleResourceValue parentStyle = getStyle(parentName, inProjectStyleMap,
inFrameworkStyleMap);
if (parentStyle != null) {
mStyleInheritanceMap.put(style, parentStyle);
}