diff --git a/compiler/testData/codegen/android/fqNameInAttr/1.kt b/compiler/testData/codegen/android/fqNameInAttr/1.kt new file mode 100644 index 00000000000..d7202aa8c72 --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInAttr/1.kt @@ -0,0 +1,29 @@ +package com.myapp + +import android.app.Activity +import android.view.View +import android.widget.* +import org.my.cool.MyButton + +class R { + class id { + class object { + val login = 5 + } + } +} + +class MyActivity(): Activity() { + val buttonWidget = MyButton(this) + + override fun findViewById(id: Int): View? { + return when (id) { + R.id.login -> buttonWidget + else -> null + } + } +} + +fun box(): String { + return "OK" +} diff --git a/compiler/testData/codegen/android/fqNameInAttr/AndroidManifest.xml b/compiler/testData/codegen/android/fqNameInAttr/AndroidManifest.xml new file mode 100644 index 00000000000..580c474f5de --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInAttr/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compiler/testData/codegen/android/fqNameInAttr/CustomWidgets.kt b/compiler/testData/codegen/android/fqNameInAttr/CustomWidgets.kt new file mode 100644 index 00000000000..cf15bfe703e --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInAttr/CustomWidgets.kt @@ -0,0 +1,8 @@ +package org.my.cool + +import android.widget.Button +import android.app.Activity + +class MyButton(ctx: Activity): Button(ctx) { + override fun toString(): String {return "Button"} +} diff --git a/compiler/testData/codegen/android/fqNameInAttr/layout/layout.xml b/compiler/testData/codegen/android/fqNameInAttr/layout/layout.xml new file mode 100644 index 00000000000..101bb490115 --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInAttr/layout/layout.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/compiler/testData/codegen/android/fqNameInTag/1.kt b/compiler/testData/codegen/android/fqNameInTag/1.kt new file mode 100644 index 00000000000..9f597fb6c3e --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInTag/1.kt @@ -0,0 +1,29 @@ +package com.myapp + +import android.app.Activity +import android.view.View +import android.widget.* +import org.my.cool.MyButton + +class R { + class id { + class object { + val login = 5 + } + } +} + +class MyActivity(): Activity() { + val buttonWidget = Button(this) + + override fun findViewById(id: Int): View? { + return when (id) { + R.id.login -> buttonWidget + else -> null + } + } +} + +fun box(): String { + return "OK" +} diff --git a/compiler/testData/codegen/android/fqNameInTag/AndroidManifest.xml b/compiler/testData/codegen/android/fqNameInTag/AndroidManifest.xml new file mode 100644 index 00000000000..580c474f5de --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInTag/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compiler/testData/codegen/android/fqNameInTag/CustomWidgets.kt b/compiler/testData/codegen/android/fqNameInTag/CustomWidgets.kt new file mode 100644 index 00000000000..59c3b9ff5be --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInTag/CustomWidgets.kt @@ -0,0 +1,8 @@ +package org.my.cool + +import android.widget.Button +import android.content.Context + +class MyButton(ctx: Context): Button(ctx) { + override fun toString(): String {return "Button"} +} diff --git a/compiler/testData/codegen/android/fqNameInTag/layout/layout.xml b/compiler/testData/codegen/android/fqNameInTag/layout/layout.xml new file mode 100644 index 00000000000..27907c09826 --- /dev/null +++ b/compiler/testData/codegen/android/fqNameInTag/layout/layout.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/compiler/testData/codegen/android/manyWidgets/1.kt b/compiler/testData/codegen/android/manyWidgets/1.kt new file mode 100644 index 00000000000..bdc79a107c2 --- /dev/null +++ b/compiler/testData/codegen/android/manyWidgets/1.kt @@ -0,0 +1 @@ +fun box() = "OK" diff --git a/compiler/testData/codegen/android/manyWidgets/AndroidManifest.xml b/compiler/testData/codegen/android/manyWidgets/AndroidManifest.xml new file mode 100644 index 00000000000..580c474f5de --- /dev/null +++ b/compiler/testData/codegen/android/manyWidgets/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compiler/testData/codegen/android/manyWidgets/layout/layout.xml b/compiler/testData/codegen/android/manyWidgets/layout/layout.xml new file mode 100644 index 00000000000..6ca5e004050 --- /dev/null +++ b/compiler/testData/codegen/android/manyWidgets/layout/layout.xml @@ -0,0 +1,67 @@ + + + + + + + + + \ No newline at end of file diff --git a/compiler/testData/codegen/android/multiFile/1.kt b/compiler/testData/codegen/android/multiFile/1.kt new file mode 100644 index 00000000000..246b6dee346 --- /dev/null +++ b/compiler/testData/codegen/android/multiFile/1.kt @@ -0,0 +1,37 @@ +package com.myapp + +import android.app.Activity +import android.view.View +import android.widget.* + +class R { + class id { + class 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" +} diff --git a/compiler/testData/codegen/android/multiFile/AndroidManifest.xml b/compiler/testData/codegen/android/multiFile/AndroidManifest.xml new file mode 100644 index 00000000000..580c474f5de --- /dev/null +++ b/compiler/testData/codegen/android/multiFile/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compiler/testData/codegen/android/multiFile/layout/layout.xml b/compiler/testData/codegen/android/multiFile/layout/layout.xml new file mode 100644 index 00000000000..f4736f6937b --- /dev/null +++ b/compiler/testData/codegen/android/multiFile/layout/layout.xml @@ -0,0 +1,29 @@ + + + + + + + +