Created
November 1, 2020 19:34
-
-
Save jobinlawrance/83d70894280dd10c70838910faa2327f 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
inline fun <reified T : Fragment> AppCompatActivity.fragmentFromFactory(): Lazy<T> { | |
return lazy { | |
supportFragmentManager.fragmentFactory.instantiate(classLoader, T::class.java.name) as T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment