Support View in android-compiler-plugin

This commit is contained in:
Yan Zhulanow
2015-03-04 21:19:28 +03:00
parent 33a1aa342f
commit 4cc5e9248a
41 changed files with 637 additions and 60 deletions
@@ -0,0 +1,17 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/item_detail_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ItemDetailActivity"
tools:ignore="MergeRootFrame" >
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in" />
</FrameLayout>
@@ -0,0 +1,15 @@
package com.myapp
import android.view.View
import android.app.Activity
import kotlinx.android.synthetic.layout.view.*
public class MyActivity : Activity() {
{ View(this).login }
}
// 1 GETSTATIC
// 4 INVOKEVIRTUAL
// 3 CHECKCAST
// 1 _\$_findCachedViewById
// 2 findViewById