Android synthetic properties are now properties with flexible type
This commit is contained in:
+9
-8
@@ -4,28 +4,29 @@ import android.app.Activity
|
||||
import android.app.Fragment
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import kotlin.internal.flexible.ft
|
||||
|
||||
val Activity.frameLayout: FrameLayout
|
||||
val Activity.frameLayout: ft<FrameLayout, FrameLayout?>
|
||||
get() = findViewById(0) as FrameLayout
|
||||
|
||||
val Fragment.frameLayout: FrameLayout
|
||||
val Fragment.frameLayout: ft<FrameLayout, FrameLayout?>
|
||||
get() = getView().findViewById(0) as FrameLayout
|
||||
|
||||
val Activity.passwordField: TextView
|
||||
val Activity.passwordField: ft<TextView, TextView?>
|
||||
get() = findViewById(0) as TextView
|
||||
|
||||
val Fragment.passwordField: TextView
|
||||
val Fragment.passwordField: ft<TextView, TextView?>
|
||||
get() = getView().findViewById(0) as TextView
|
||||
|
||||
val Activity.passwordCaption: EditText
|
||||
val Activity.passwordCaption: ft<EditText, EditText?>
|
||||
get() = findViewById(0) as EditText
|
||||
|
||||
val Fragment.passwordCaption: EditText
|
||||
val Fragment.passwordCaption: ft<EditText, EditText?>
|
||||
get() = getView().findViewById(0) as EditText
|
||||
|
||||
val Activity.loginButton: Button
|
||||
val Activity.loginButton: ft<Button, Button?>
|
||||
get() = findViewById(0) as Button
|
||||
|
||||
val Fragment.loginButton: Button
|
||||
val Fragment.loginButton: ft<Button, Button?>
|
||||
get() = getView().findViewById(0) as Button
|
||||
|
||||
|
||||
Reference in New Issue
Block a user