Created
December 13, 2018 07:25
-
-
Save Atsumi3/d79f1bc3dad2f7e340ef1f280c82cf0c to your computer and use it in GitHub Desktop.
Create instance from KClass<out View>, with constructor parameters.
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 KClass<out View>.get(context: Context): View? = primaryConstructor?.call(context) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment