Cast findViewById() result to Views safely

This commit is contained in:
Yan Zhulanow
2015-03-26 16:03:58 +03:00
parent 1f16328070
commit fae114f606
17 changed files with 62 additions and 62 deletions
@@ -13,8 +13,8 @@ import android.support.v4.widget.*
import kotlin.internal.flexible.ft
val android.app.Activity.button: ft<View, View?>
get() = findViewById(0) : View
get() = findViewById(0)
val android.app.Fragment.button: ft<View, View?>
get() = getView().findViewById(0) : View
get() = getView().findViewById(0)
@@ -13,5 +13,5 @@ import android.support.v4.widget.*
import kotlin.internal.flexible.ft
val android.view.View.button: ft<View, View?>
get() = findViewById(0) : View
get() = findViewById(0)