Cast findViewById() result to Views safely
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user