Asad Mukhtar
09/16/2022, 7:19 AMAsad Mukhtar
09/16/2022, 7:19 AM@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)
)
)
}
}
Chris Sinco [G]
09/16/2022, 9:38 AMplaceholder
to draw above the content, you might have to use the Modifier drawWithContent