Created
June 18, 2022 21:54
-
-
Save hsmnzaydn/51dcb0a74ebf30e320950f7126527b1c 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
@ExperimentalMaterial3Api | |
@Composable | |
fun ItemView() { | |
Card( // Material 3'te Card şuan betada | |
modifier = Modifier.padding(8.dp), | |
colors = CardDefaults.cardColors( | |
containerColor = MaterialTheme.colorScheme.surface, // Burada kart kullandığımız için Material Design surface rengini kullanmamız gerektiğini söylüyor | |
), | |
shape = MaterialTheme.shapes.large, | |
) { | |
Column(horizontalAlignment = Alignment.CenterHorizontally) { | |
Text( | |
text = "Title", | |
style = MaterialTheme.typography.titleLarge, // Title olduğu için typography olarak titleLarge kullandım | |
color = MaterialTheme.colorScheme.onSurface // Bu item surface (Card) componentinin üstünde olduğu için onSurface rengini alıyor | |
) | |
Column(modifier = Modifier.padding(16.dp)) { | |
Text( | |
text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", | |
style = MaterialTheme.typography.bodyLarge, // Body olduğu için typography olarak bodyLarge kullandım | |
color = MaterialTheme.colorScheme.onSurface // Bu item surface (Card) componentinin üstünde olduğu için onSurface rengini alıyor | |
) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment