Do not cast findViewById to View
This commit is contained in:
+6
-6
@@ -7,20 +7,20 @@ import android.widget.*
|
||||
import kotlin.internal.flexible.ft
|
||||
|
||||
val Activity.includeTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
val Fragment.includeTag: ft<View, View?>
|
||||
get() = getView().findViewById(0) as View
|
||||
get() = getView().findViewById(0) : View
|
||||
|
||||
val Activity.mergeTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
val Fragment.mergeTag: ft<View, View?>
|
||||
get() = getView().findViewById(0) as View
|
||||
get() = getView().findViewById(0) : View
|
||||
|
||||
val Activity.fragmentTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
val Fragment.fragmentTag: ft<View, View?>
|
||||
get() = getView().findViewById(0) as View
|
||||
get() = getView().findViewById(0) : View
|
||||
|
||||
|
||||
+3
-3
@@ -7,11 +7,11 @@ import android.widget.*
|
||||
import kotlin.internal.flexible.ft
|
||||
|
||||
val View.includeTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
val View.mergeTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
val View.fragmentTag: ft<View, View?>
|
||||
get() = findViewById(0) as View
|
||||
get() = findViewById(0) : View
|
||||
|
||||
|
||||
Reference in New Issue
Block a user