Created
July 29, 2019 22:49
-
-
Save jirevwe/330046f5a82cabe8b6ed2123d1a6400c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <V : View> Activity.bind(@IdRes resource: Int): V { | |
val lazyValue: Lazy<V> = lazy { findViewById(resource) } | |
return lazyValue.value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment