vitaliy
09/07/2021, 2:04 PMrememberRipple(bounded = false)
. So far it is simply rectangular as a Box
with:
modifier = Modifier
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(color = highlightColor),
enabled = enabled,
role = Role.Button,
onClick = onClick
)
.padding( <some paddings> )
I’m running out of ideas and my Compose kung-fu is pretty basic so far. I’ll appreciate any hints you may have for me!krzysztof
09/07/2021, 2:30 PMpadding
before clickable
? Order of modifiers does matter in composevitaliy
09/07/2021, 2:36 PMSurface
instead of the Box
and adding .clip()
modifier with a custom shape with arches.Tin Tran
09/07/2021, 2:40 PMclickable
after clip()
?vitaliy
09/07/2021, 2:48 PMTin Tran
09/07/2021, 3:32 PMTin Tran
09/07/2021, 3:41 PMBox(
modifier = Modifier
.clip(TicketFirstHalfShape(12f, 12f))
.clickable { }
.background(color = Color.Red)
.height(100.dp)
) {
Image(
painter = painterResource(id = R.drawable.ic_list_buck_orange),
contentDescription = "",
Modifier.align(
Alignment.CenterStart
)
)
}
Tin Tran
09/07/2021, 3:41 PMvitaliy
09/07/2021, 7:11 PM