https://kotlinlang.org logo
#compose
Title
# compose
w

why

02/02/2021, 11:07 AM
hi.. after compose alpha11 I can't use indication with clickable() I wanna set it to
null
like this:
Copy code
Modifier.clickable (indication = null){}
any idea?
m

Michael Elgavi

02/02/2021, 11:10 AM
Had the same issue, for some reason it's choosing the wrong overload of
clickable
, possibly a kotlin compiler bug? Anyway I got it to work by also specifying `interactionState`:
Copy code
Modifier.clickable(
    indication = null,
    interactionState = remember { InteractionState() }) { ... }
💯 1
w

why

02/02/2021, 11:13 AM
thank you it worked 😄 but do you know why is it marked as
@Suppress("DEPRECATION")
in the src?
m

Michael Elgavi

02/02/2021, 11:15 AM
I think that means the implementation is using deprecated API, the clickable API itself isn't deprecated
👍 1
s

Sinan Gunes

02/02/2021, 11:21 AM
I started to use
Modifier.clickable().indication()
w

why

02/02/2021, 11:26 AM
but giving it
null
doesn't remove the
indication
effect, how do you use it?
s

Sinan Gunes

02/02/2021, 11:28 AM
Ah, my purpose was not to remove indication, but instead sync between whole layout and a switch in it.
🙂 1
z

Zach Klippenstein (he/him) [MOD]

02/02/2021, 1:59 PM
This CL was mentioned in the release notes, not sure if it is related: https://android-review.googlesource.com/c/platform/frameworks/support/+/1554623