Skip to content

Instantly share code, notes, and snippets.

@zurche
Last active July 10, 2023 12:54
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 zurche/8d3953afcec8c0d02dfc80c2e655e0c2 to your computer and use it in GitHub Desktop.
Save zurche/8d3953afcec8c0d02dfc80c2e655e0c2 to your computer and use it in GitHub Desktop.
Main Activity Navigation Graph
class MainActivity : ComponentActivity() {
private val viewModel: MoviesViewModel by viewModel()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MoviesListTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
MoviesAppNavigationView(viewModel.moviesState)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment