Skip to content

Instantly share code, notes, and snippets.

@kozmi55
Created August 16, 2021 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozmi55/81545f5dae1ef9a49c5edb5b4625da4c to your computer and use it in GitHub Desktop.
Save kozmi55/81545f5dae1ef9a49c5edb5b4625da4c to your computer and use it in GitHub Desktop.
@AndroidEntryPoint
class MainActivity : AppCompatActivity() {
private val viewModel: CarListViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val binding = ActivityMainBinding.inflate(layoutInflater)
binding.lifecycleOwner = this
binding.viewModel = viewModel
setContentView(binding.root)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment