Closed ammargitham closed 1 year ago
As a workaround this works for me (Preview seems to show the chip peeking from behind, but on device seems fine):
Box(
modifier = Modifier.width(IntrinsicSize.Max),
) {
AssistChip(
onClick = {},
label = { Text(text = "#Test-1") },
)
if (loading) {
Box(
modifier = Modifier
.height(AssistChipDefaults.Height)
.fillMaxWidth()
.align(Alignment.Center)
.placeholder(
color = MaterialTheme.colorScheme.surfaceColorAtElevation(2.dp),
visible = true,
highlight = PlaceholderHighlight.fade(),
shape = AssistChipDefaults.shape,
)
)
}
}
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Describe the bug
As visible in the screenshot below, the placeholder height is greater than the AssistChip height.
To Reproduce
Code to reproduce:
Expected behavior
The placeholder height should be same as the rendered AssistChip height.
Screenshots?
Environment: