Android extensions: Fix onDestroy in Fragments

This commit is contained in:
Yan Zhulanow
2015-11-11 18:54:28 +03:00
parent 10b7b069b4
commit 0dada9d13a
2 changed files with 2 additions and 2 deletions
@@ -91,7 +91,7 @@ public class AndroidExpressionCodegenExtension : ExpressionCodegenExtension {
private val PROPERTY_NAME = "_\$_findViewCache" private val PROPERTY_NAME = "_\$_findViewCache"
private val CACHED_FIND_VIEW_BY_ID_METHOD_NAME = "_\$_findCachedViewById" private val CACHED_FIND_VIEW_BY_ID_METHOD_NAME = "_\$_findCachedViewById"
val CLEAR_CACHE_METHOD_NAME = "_\$_clearFindViewByIdCache" val CLEAR_CACHE_METHOD_NAME = "_\$_clearFindViewByIdCache"
val ON_DESTROY_METHOD_NAME = "onDestroy" val ON_DESTROY_METHOD_NAME = "onDestroyView"
fun isCacheSupported(descriptor: ClassifierDescriptor) = descriptor.source is KotlinSourceElement fun isCacheSupported(descriptor: ClassifierDescriptor) = descriptor.source is KotlinSourceElement
} }
@@ -18,6 +18,6 @@ public class MyFragment2 : Fragment() {
} }
// 2 public onDestroy\(\)V // 2 public onDestroyView\(\)V
// 1 INVOKEVIRTUAL test/MyFragment\._\$_clearFindViewByIdCache // 1 INVOKEVIRTUAL test/MyFragment\._\$_clearFindViewByIdCache
// 1 INVOKEVIRTUAL test/MyFragment2\._\$_clearFindViewByIdCache // 1 INVOKEVIRTUAL test/MyFragment2\._\$_clearFindViewByIdCache