Android Extensions: Correctly handle namespaces in layout xml

#KT-19451 Fixed Target versions 1.1.5
This commit is contained in:
Vyacheslav Gerasimov
2017-08-16 15:38:41 +03:00
parent 1dfa05fe49
commit cb3a8d87d0
5 changed files with 38 additions and 3 deletions
@@ -43,7 +43,7 @@ class AndroidXmlVisitor(val elementCallback: (ResourceIdentifier, String, XmlAtt
return
}
val idAttribute = tag?.getAttribute(AndroidConst.ID_ATTRIBUTE)
val idAttribute = tag?.getAttribute(AndroidConst.ID_ATTRIBUTE_NO_NAMESPACE, AndroidConst.ANDROID_NAMESPACE)
if (idAttribute != null) {
val idAttributeValue = idAttribute.value
if (idAttributeValue != null) {
@@ -52,6 +52,7 @@ class AndroidXmlVisitor(val elementCallback: (ResourceIdentifier, String, XmlAtt
if (name != null) elementCallback(name, xmlType, idAttribute)
}
}
tag?.acceptChildren(this)
}
}