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,31 @@
package kotlinx.android.synthetic.layout1
import android.app.Activity
import android.app.Fragment
import android.view.View
import android.widget.*
val Activity.frameLayout: FrameLayout
get() = findViewById(0) as FrameLayout
val Fragment.frameLayout: FrameLayout
get() = getView().findViewById(0) as FrameLayout
val Activity.passwordField: TextView
get() = findViewById(0) as TextView
val Fragment.passwordField: TextView
get() = getView().findViewById(0) as TextView
val Activity.passwordCaption: EditText
get() = findViewById(0) as EditText
val Fragment.passwordCaption: EditText
get() = getView().findViewById(0) as EditText
val Activity.loginButton: Button
get() = findViewById(0) as Button
val Fragment.loginButton: Button
get() = getView().findViewById(0) as Button