Last active
March 12, 2020 15:42
-
-
Save cribetti/e5100b272a4fcf4b5a4cab972606e2dc 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 MyActivity() : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
supportFragmentManager.fragmentFactory = FragmentFactoryImpl() | |
super.onCreate(savedInstanceState) | |
... | |
val fragment = supportFragmentManager.fragmentFactory.instantiate(classLoader, MyFragment::class.java.name) | |
supportFragmentManager.beginTransaction() | |
.replace(R.id.fragment_layout, fragment) | |
.commitNow() | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment