Created
January 25, 2026 13:42
-
-
Save linreal/0de55a457a62fb807465c958f5f08cc3 to your computer and use it in GitHub Desktop.
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
| // After: same visual, fewer layers, bounded ripple | |
| Modifier | |
| .fillMaxWidth() // layout first | |
| .padding(12.dp) | |
| .graphicsLayer { // consolidate heavy ops | |
| alpha = 0.98f | |
| shape = RoundedCornerShape(12.dp) | |
| clip = true | |
| shadowElevation = 4.dp.toPx() | |
| } | |
| .background(MaterialTheme.colorScheme.surfaceVariant) // drawn inside layer & clipped | |
| .clickable( | |
| interactionSource = remember { MutableInteractionSource() }, | |
| indication = rememberRipple(bounded = true) | |
| ) { onMessageClick() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment