Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ce3b775 authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

LayoutLib: support for custom styles.

Change-Id: Ic6c2ef234589f45db15024261d698066aa6e2f4e
parent 595f48b2
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -259,7 +259,18 @@ public final class BridgeContext extends Context {

        // resolve the defStyleAttr value into a IStyleResourceValue
        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.
            String defStyleName = searchAttr(defStyleAttr);