Skip to content

Instantly share code, notes, and snippets.

@carotkut94
Created October 21, 2021 10:03
Show Gist options
  • Save carotkut94/3d505f732e0f8298a1a9fc3b62d58852 to your computer and use it in GitHub Desktop.
Save carotkut94/3d505f732e0f8298a1a9fc3b62d58852 to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
lateinit var binding: SampleBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = SampleBinding.inflate(layoutInflater, findViewById(android.R.id.content), true)
supportFragmentManager.beginTransaction()
.add(binding.frame.id, DemoFragment(), "Sample").commit()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment