e

    eschrag

    1 year ago
    Is there a way to clip the touch area of a Surface or any other Material component? I was able to get the ripple and drawn view to clip based on a vector, but it is still touchable in its square outside the clip area.
    i

    Ian Lake

    1 year ago
    Where are you putting your clickable modifier in comparison to your clipping, etc? Order matters when it comes to modifiers
    e

    eschrag

    1 year ago
    I think it implicitly is before, as the clickable is being set by Button
    Button(
                contentPadding = PaddingValues(0.dp),
                onClick = onClickAction,
                modifier = Modifier
                    .clip(makeClipShape(id = vectorIconId))
                    .size(width = width, height = height)
                    .constrainAs(icon1) {
                        top.linkTo(icon2.bottom)
                        bottom.linkTo(icon3.bottom)
                        start.linkTo(parent.start)
                        end.linkTo(parent.end)
                    }
                    .testTag(TEST_TAG))
    is this a situation where we just have to clone Button and customize it to get the right ordering?