-
-
Save saqib-github-commits/4c4b4d5491ede08fa5fbb666ab5dae4e to your computer and use it in GitHub Desktop.
This file contains 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
////*** 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