Last active
March 12, 2020 15:41
-
-
Save cribetti/b649f92424fbd5b6abe88244d5eb71f2 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
class FragmentFactoryImpl: FragmentFactory() { | |
val arg = "my argument" | |
override fun instantiate(classLoader: ClassLoader, className: String): Fragment { | |
return when (className) { | |
MyFragment::class.java.name -> MyFragment(arg) | |
else -> super.instantiate(classLoader, className) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment