Skip to content

Instantly share code, notes, and snippets.

@vidyesh95
Created September 25, 2021 10:23
Show Gist options
  • Save vidyesh95/772760f0fbe01f8c8f39d8fac565b1ad to your computer and use it in GitHub Desktop.
Save vidyesh95/772760f0fbe01f8c8f39d8fac565b1ad to your computer and use it in GitHub Desktop.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyApp()
}
}
}
@Composable
fun MyApp() {
ComposeSupportAllScreenSizesTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colors.background
) {
}
}
}
@Preview(showBackground = true, name = "Light mode")
@Preview(showBackground = true, name = "Night mode", uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
fun DefaultPreview() {
MyApp()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment