Created
September 25, 2021 10:23
-
-
Save vidyesh95/772760f0fbe01f8c8f39d8fac565b1ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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