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.item_detail_container: FrameLayout
|
||||
val Activity.item_detail_container: ft<FrameLayout, FrameLayout?>
|
||||
get() = findViewById(0) as FrameLayout
|
||||
|
||||
val Fragment.item_detail_container: FrameLayout
|
||||
val Fragment.item_detail_container: ft<FrameLayout, FrameLayout?>
|
||||
get() = getView().findViewById(0) as FrameLayout
|
||||
|
||||
val Activity.textView1: TextView
|
||||
val Activity.textView1: ft<TextView, TextView?>
|
||||
get() = findViewById(0) as TextView
|
||||
|
||||
val Fragment.textView1: TextView
|
||||
val Fragment.textView1: ft<TextView, TextView?>
|
||||
get() = getView().findViewById(0) as TextView
|
||||
|
||||
val Activity.password: EditText
|
||||
val Activity.password: ft<EditText, EditText?>
|
||||
get() = findViewById(0) as EditText
|
||||
|
||||
val Fragment.password: EditText
|
||||
val Fragment.password: ft<EditText, EditText?>
|
||||
get() = getView().findViewById(0) as EditText
|
||||
|
||||
val Activity.login: Button
|
||||
val Activity.login: ft<Button, Button?>
|
||||
get() = findViewById(0) as Button
|
||||
|
||||
val Fragment.login: Button
|
||||
val Fragment.login: ft<Button, Button?>
|
||||
get() = getView().findViewById(0) as Button
|
||||
|
||||
|
||||
+5
-4
@@ -4,16 +4,17 @@ import android.app.Activity
|
||||
import android.app.Fragment
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import kotlin.internal.flexible.ft
|
||||
|
||||
val View.item_detail_container: FrameLayout
|
||||
val View.item_detail_container: ft<FrameLayout, FrameLayout?>
|
||||
get() = findViewById(0) as FrameLayout
|
||||
|
||||
val View.textView1: TextView
|
||||
val View.textView1: ft<TextView, TextView?>
|
||||
get() = findViewById(0) as TextView
|
||||
|
||||
val View.password: EditText
|
||||
val View.password: ft<EditText, EditText?>
|
||||
get() = findViewById(0) as EditText
|
||||
|
||||
val View.login: Button
|
||||
val View.login: ft<Button, Button?>
|
||||
get() = findViewById(0) as Button
|
||||
|
||||
|
||||
Reference in New Issue
Block a user