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
@Preview(showBackground = true) | |
@Composable | |
fun GreetingPreview() { | |
GoogleFontsIntoM3Theme { // GoogleFontsIntoM3Theme is my project's theme | |
Greeting("World") | |
} | |
} |
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
Text( | |
text = "Hello, $name!", | |
modifier = modifier, | |
style = MaterialTheme.typography.displayLarge | |
) |
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
@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 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 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 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 |
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
@Composable | |
fun Movie(movie: Movie, modifier: Modifier = Modifier) { | |
Row( | |
modifier.padding(horizontal = 5.dp, vertical = 10.dp) | |
) { | |
Text( | |
text = movie.name, | |
modifier = modifier |
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
@Composable | |
fun Movies(modifier: Modifier = Modifier) { | |
val movies = mutableListOf( | |
Movie("Atlas", 2024), | |
Movie("Road House", 1989), | |
Movie("The Mummy", 1999), | |
Movie("Anna", 2019), | |
Movie("Mad Max: Fury Road", 2015), | |
Movie("Hidden Figures", 2016), |
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
@Composable | |
fun MovieGenres(modifier: Modifier = Modifier) { | |
val genres = listOf( | |
"Action", | |
"History", | |
"Documentary", | |
"Sci-Fi", | |
"Thriller", | |
"Biography", |
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
@Composable | |
fun MovieGenres(modifier: Modifier = Modifier) { | |
val genres = listOf( | |
"Action", | |
"History", | |
"Documentary", | |
"Sci-Fi", | |
"Thriller", | |
"Biography", |
NewerOlder