-
-
Save Leviaran/44821db5d7398cffe190b2096262e4da 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 MyFragmentFactory ( | |
private val requestService: RequestService | |
) : FragmentFactory() { | |
override fun instantiate(classLoader: ClassLoader, className: String): Fragment { ... } | |
} | |
// Your Activity | |
class MainActivity : AppCompatActivity() { | |
@Inject | |
lateinit var fragmentFactory: MyFragmentFactory | |
override fun onCreate(savedInstanceState: Bundle?) { | |
supportFragmentManager.fragmentFactory = fragmentFactory | |
super.onCreate(savedInstanceState) | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment