Skip to content

Instantly share code, notes, and snippets.

@BambangHeriSetiawan
Created September 26, 2018 07:13
Show Gist options
  • Select an option

  • Save BambangHeriSetiawan/e65650d28eb9c3f5efe7c4525ff10ad5 to your computer and use it in GitHub Desktop.

Select an option

Save BambangHeriSetiawan/e65650d28eb9c3f5efe7c4525ff10ad5 to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main_activity)
if (savedInstanceState == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.container, MainFragment.newInstance())
.commitNow()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment