Search code examples
android-jetpack-composeandroid-jetpackandroid-jetpack-compose-text

Change highlight on clickable Text possible?


I have a @Composable Text("Dropbox") whose Modifier also implements a

clickable {
    //..
}

But when I tapping on it

enter image description here

, it gets a grey highlight!?

enter image description here

I do not want this grey hightlight. Can I get rid of this?


Solution

  • Here indication is responsible for showing the highlight. So making indication = null should do the job

    .clickable(
        onClick = {
            //..
        },
        indication = null,
        interactionSource = remember { MutableInteractionSource() }
    )