Call findViewById if invoked on anything but our Activity class
This commit is contained in:
+6
-3
@@ -5,8 +5,11 @@ import kotlinx.android.synthetic.layout.*
|
||||
|
||||
class MyActivity: Activity() {
|
||||
val button = this.MyButton
|
||||
val button2 = MyButton
|
||||
}
|
||||
|
||||
// 1 GETSTATIC
|
||||
// 4 INVOKEVIRTUAL
|
||||
// 2 CHECKCAST
|
||||
// 2 GETSTATIC
|
||||
// 5 INVOKEVIRTUAL
|
||||
// 3 CHECKCAST
|
||||
// 3 _\$_findCachedViewById
|
||||
// 1 findViewById
|
||||
Reference in New Issue
Block a user