Merge "LayoutLib: support for custom styles." into eclair

This commit is contained in:
Xavier Ducrohet
2010-01-11 15:25:16 -08:00
committed by Android (Google) Code Review

View File

@@ -259,7 +259,18 @@ public final class BridgeContext extends Context {
// resolve the defStyleAttr value into a IStyleResourceValue // resolve the defStyleAttr value into a IStyleResourceValue
IStyleResourceValue defStyleValues = null; IStyleResourceValue defStyleValues = null;
if (defStyleAttr != 0) {
// look for a custom style.
String customStyle = parser.getAttributeValue(null /* namespace*/, "style");
if (customStyle != null) {
IResourceValue item = findResValue(customStyle);
if (item instanceof IStyleResourceValue) {
defStyleValues = (IStyleResourceValue)item;
}
}
if (defStyleValues == null && defStyleAttr != 0) {
// get the name from the int. // get the name from the int.
String defStyleName = searchAttr(defStyleAttr); String defStyleName = searchAttr(defStyleAttr);