Ignore fragment tag (it requires a different implementation)

This commit is contained in:
Yan Zhulanow
2015-04-02 21:34:02 +03:00
parent b4cfacbac7
commit df12331173
3 changed files with 2 additions and 14 deletions
@@ -38,7 +38,7 @@ public object AndroidConst {
val CLEAR_FUNCTION_NAME = "clearFindViewByIdCache"
val IGNORED_XML_WIDGET_TYPES = setOf("requestFocus", "merge", "tag", "check")
val IGNORED_XML_WIDGET_TYPES = setOf("requestFocus", "merge", "tag", "check", "fragment")
val ESCAPED_IDENTIFIERS = (JetTokens.KEYWORDS.getTypes() + JetTokens.SOFT_KEYWORDS.getTypes())
.map { it as? JetKeywordToken }.filterNotNull().map { it.getValue() }.toSet()
@@ -64,10 +64,7 @@ public fun isWidgetTypeIgnored(xmlType: String): Boolean {
return (xmlType.isEmpty() || xmlType in AndroidConst.IGNORED_XML_WIDGET_TYPES)
}
public fun getRealWidgetType(xmlType: String): String = when (xmlType) {
"fragment", "include" -> "View"
else -> xmlType
}
public fun getRealWidgetType(xmlType: String): String = if (xmlType == "include") "View" else xmlType
fun escapeAndroidIdentifier(id: String): String {
return if (id in AndroidConst.ESCAPED_IDENTIFIERS) "`$id`" else id
@@ -18,12 +18,6 @@ val android.app.Activity.includeTag: ft<View, View?>
val android.app.Fragment.includeTag: ft<View, View?>
get() = getView().findViewById(0)
val android.app.Activity.fragmentTag: ft<View, View?>
get() = findViewById(0)
val android.app.Fragment.fragmentTag: ft<View, View?>
get() = getView().findViewById(0)
val android.app.Activity.`fun`: ft<TextView, TextView?>
get() = findViewById(0) as? TextView
@@ -15,9 +15,6 @@ import kotlin.internal.flexible.ft
val android.view.View.includeTag: ft<View, View?>
get() = findViewById(0)
val android.view.View.fragmentTag: ft<View, View?>
get() = findViewById(0)
val android.view.View.`fun`: ft<TextView, TextView?>
get() = findViewById(0) as? TextView