Support cache cleanup in android-compiler-plugin
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
{clearFindViewByIdCache()}
|
||||
}
|
||||
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 1 CHECKCAST
|
||||
// 2 _\$_clearFindViewByIdCache
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.*
|
||||
|
||||
public fun Activity.a() {
|
||||
clearFindViewByIdCache()
|
||||
}
|
||||
|
||||
// 0 clearFindViewByIdCache
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun MyActivity.b() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun Activity.b() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 1 _\$_findCachedViewById
|
||||
// 3 findViewById
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun Fragment.b() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 8 INVOKEVIRTUAL
|
||||
// 9 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 1 _\$_findCachedViewById
|
||||
// 3 findViewById
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun MyActivity.b() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -9,7 +9,7 @@ class MyActivity: Activity() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -9,7 +9,7 @@ class MyFragment: Fragment() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 7 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ class MyActivity: Activity() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -9,7 +9,7 @@ class MyFragment: Fragment() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 7 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ class MyActivity: Activity() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -14,7 +14,7 @@ class MyFragment: Fragment() {
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 9 INVOKEVIRTUAL
|
||||
// 11 INVOKEVIRTUAL
|
||||
// 4 CHECKCAST
|
||||
// 4 _\$_findCachedViewById
|
||||
// 2 findViewById
|
||||
|
||||
@@ -10,7 +10,7 @@ public class MyActivity : Activity() {
|
||||
}
|
||||
|
||||
// 1 GETSTATIC
|
||||
// 4 INVOKEVIRTUAL
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 2 CHECKCAST
|
||||
// 2 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
+1
-1
@@ -9,7 +9,7 @@ public class MyFragment : Fragment() {
|
||||
}
|
||||
|
||||
// 1 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 6 INVOKEVIRTUAL
|
||||
// 2 CHECKCAST
|
||||
// 2 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ public class MyActivity : Activity() {
|
||||
}
|
||||
|
||||
// 1 GETSTATIC
|
||||
// 4 INVOKEVIRTUAL
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 1 _\$_findCachedViewById
|
||||
// 2 findViewById
|
||||
Reference in New Issue
Block a user