Skip to content

Instantly share code, notes, and snippets.

@saqib-github-commits
Last active January 18, 2024 17:37
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 saqib-github-commits/4c4b4d5491ede08fa5fbb666ab5dae4e to your computer and use it in GitHub Desktop.
Save saqib-github-commits/4c4b4d5491ede08fa5fbb666ab5dae4e to your computer and use it in GitHub Desktop.
////*** Setting content in MainActivity
CompositionLocalSampleTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
Greeting("Android")
}
}
////*** Greating Composable
@Composable
fun Greeting(name: String) {
Text(
modifier = modifier,
text = "Hello $name!",
color = MaterialTheme.colorScheme.primary,
style = MaterialTheme.typography.bodyLarge,
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment