Files
kotlin-fork/plugins/android-compiler-plugin/testData/codegen/android/multiFile/1.kt
T
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00

40 lines
884 B
Kotlin

package com.myapp
import android.app.Activity
import android.view.View
import android.widget.*
import kotlinx.android.synthetic.layout.*
import kotlinx.android.synthetic.layout1.*
class R {
class id {
default object {
val item_detail_container = 0
val textView1 = 1
val password = 2
val textView2 = 3
val passwordConfirmation = 4
val login = 5
}
}
}
class MyActivity(): Activity() {
val textViewWidget = TextView(this)
val editTextWidget = EditText(this)
val buttonWidget = Button(this)
override fun findViewById(id: Int): View? {
return when (id) {
R.id.textView1 -> textViewWidget
R.id.password -> editTextWidget
R.id.login -> buttonWidget
else -> null
}
}
}
fun box(): String {
return "OK"
}