This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
anko/library/static/common/src Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 18
18
package org.jetbrains.anko
19
19
20
20
import android.app.Activity
21
+ import android.app.Dialog
21
22
import android.app.Fragment
22
23
import android.content.Context
23
24
import android.content.SharedPreferences
@@ -67,10 +68,12 @@ inline val Activity.contentView: View?
67
68
inline fun <reified T : View > View.find (@IdRes id : Int ): T = findViewById(id) as T
68
69
inline fun <reified T : View > Activity.find (@IdRes id : Int ): T = findViewById(id) as T
69
70
inline fun <reified T : View > Fragment.find (@IdRes id : Int ): T = view?.findViewById(id) as T
71
+ inline fun <reified T : View > Dialog.find (@IdRes id : Int ): T = findViewById(id) as T
70
72
71
73
inline fun <reified T : View > View.findOptional (@IdRes id : Int ): T ? = findViewById(id) as ? T
72
74
inline fun <reified T : View > Activity.findOptional (@IdRes id : Int ): T ? = findViewById(id) as ? T
73
75
inline fun <reified T : View > Fragment.findOptional (@IdRes id : Int ): T ? = view?.findViewById(id) as ? T
76
+ inline fun <reified T : View > Dialog.findOptional (@IdRes id : Int ): T ? = findViewById(id) as ? T
74
77
75
78
inline fun <T : Fragment > T.withArguments (vararg params : Pair <String , Any >): T {
76
79
arguments = bundleOf(* params)
You can’t perform that action at this time.
0 commit comments