Skip to content

Instantly share code, notes, and snippets.

@jobinlawrance
Created November 1, 2020 20:05
Show Gist options
  • Save jobinlawrance/994671e69fcfb9ef9fa713a98d79dcf3 to your computer and use it in GitHub Desktop.
Save jobinlawrance/994671e69fcfb9ef9fa713a98d79dcf3 to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
private val mainFragment by fragmentFromFactory<MainFragment>()
override fun onCreate(savedInstanceState: Bundle?) {
setupKoinFragmentFactory() //This has to be done before super call
super.onCreate(savesInstanceState)
supportFragmentManager.beginTransaction()
.add(R.layout.fragmentContainerView, mainFragment)
.commit()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment