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
@Preview(showBackground = true) | |
@Composable | |
fun GreetingPreview() { | |
GoogleFontsIntoM3Theme { // GoogleFontsIntoM3Theme is my project's theme | |
Greeting("World") | |
} | |
} |
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
Text( | |
text = "Hello, $name!", | |
modifier = modifier, | |
style = MaterialTheme.typography.displayLarge | |
) |
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
@Composable | |
fun Greeting(name: String, modifier: Modifier = Modifier) { | |
Column(modifier = modifier.fillMaxSize(), | |
verticalArrangement = Arrangement.Center, | |
horizontalAlignment = Alignment.CenterHorizontally) { | |
Text( | |
text = "Hello, $name!", | |
modifier = modifier | |
) |
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
val Typography = Typography( | |
bodyLarge = TextStyle( | |
fontFamily = FontFamily.Default, | |
fontWeight = FontWeight.Normal, | |
fontSize = 16.sp, | |
lineHeight = 24.sp, | |
letterSpacing = 0.5.sp | |
), | |
displayLarge = TextStyle( |
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
displayLarge = TextStyle( | |
fontFamily = FontFamily(Font(R.font.montserrat_semibold)), | |
fontWeight = FontWeight.SemiBold, | |
lineHeight = 23.sp, | |
fontSize = 30.sp, | |
letterSpacing = 2.sp | |
) |
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
val Typography = Typography( | |
bodyLarge = TextStyle( | |
fontFamily = FontFamily.Default, | |
fontWeight = FontWeight.Normal, | |
fontSize = 16.sp, | |
lineHeight = 24.sp, | |
letterSpacing = 0.5.sp | |
) | |
/* Other default text styles to override |
NewerOlder