mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
35 lines
690 B
Kotlin
Vendored
35 lines
690 B
Kotlin
Vendored
package test
|
|
|
|
import android.app.Activity
|
|
import android.app.Fragment
|
|
import android.content.Context
|
|
import android.view.View
|
|
import android.widget.*
|
|
import org.my.cool.MyButton
|
|
import kotlinx.android.synthetic.main.layout.*
|
|
|
|
class R {
|
|
class id {
|
|
companion object {
|
|
const val login = 5
|
|
}
|
|
}
|
|
}
|
|
|
|
class MyFragment(): Fragment() {
|
|
val baseActivity = Activity()
|
|
|
|
override fun getActivity(): Activity = baseActivity
|
|
|
|
override fun getView(): View? = null
|
|
|
|
public fun box(): String {
|
|
val button = login
|
|
return if (button == null) "OK" else "Button is not null: $button"
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return MyFragment().box()
|
|
}
|