-
-
Save eevajonnapanula/fa5e10c70be3fbbad7de0cfea7b4a08e 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
Row( | |
modifier = Modifier | |
.fillMaxWidth() | |
.clip(MaterialTheme.shapes.large) | |
.background(MaterialTheme.colorScheme.primaryContainer) | |
// Add clickable-modifier with the role of Button | |
.clickable( | |
role = Role.Button | |
) { | |
onClick() | |
} | |
.padding(ClickableScreen.padding), | |
horizontalArrangement = Arrangement.SpaceBetween, | |
verticalAlignment = Alignment.CenterVertically, | |
) { | |
Text( | |
text = "Bookmark this item", | |
style = MaterialTheme.typography.titleMedium, | |
color = MaterialTheme.colorScheme.onPrimaryContainer | |
) | |
// Remove IconButton. | |
// The content description is not needed anymore | |
// as the whole element is merged and text serves as a label | |
FavouriteIcon(icon = icon, modifier = Modifier.padding(12.dp)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment