Hi, Why it first shows image & text then show ...
# compose
a
Hi, Why it first shows image & text then show shimmer on top of that ?
Copy code
@OptIn(ExperimentalUnitApi::class)
@Composable
fun FilterTag(isShimmering: Boolean) {
    Row(
        verticalAlignment = Alignment.CenterVertically,
        modifier = Modifier
            .placeholder(
                visible = isShimmering,
                highlight = PlaceholderHighlight.shimmer()
            )
            .background(color = PrimaryTextColor, shape = RoundedCornerShape(3.dp))
            .padding(vertical = 3.dp, horizontal = 6.5.dp),
        horizontalArrangement = Arrangement.spacedBy(3.50.dp)
    ) {
        Image(
            painter = painterResource(id = R.drawable.ic_filters), contentDescription = null,
            modifier = Modifier.size(13.dp)
        )
        Text(
            text = stringResource(id = R.string.filters),
            modifier = Modifier,
            style = mediumTextStyle.copy(
                color = Color.White, fontSize = TextUnit(12f, TextUnitType.Sp)
            )
        )
    }
}
c
The children content of Row is drawn above the Row’s modifiers, so if you want
placeholder
to draw above the content, you might have to use the Modifier drawWithContent