Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 拡張したメソッドの一部 */
- public fun <V : View> View.bindView(id: Int, exInit: (V) -> V)
- : ReadOnlyProperty<View, V> = required(id, viewFinder, exInit)
- @Suppress("UNCHECKED_CAST")
- private fun <T, V : View> required(id: Int, finder: T.(Int) -> View?, exInit:(V) -> V)
- = Lazy({t: T, desc -> exInit(t.finder(id) as V? ?: viewNotFound(id, desc)) })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement