https://kotlinlang.org logo
Title
z

Zan Skamljic

06/06/2021, 9:35 AM
I'm having some trouble with ripple on FABs, a simple click does not trigger the ripple at all, while a long press does. Is there a way to make the ripple show always, and possibly change the color as well?
👀 1
t

Tin Tran

06/06/2021, 10:26 AM
I’m having the same issue after upgrading to beta8
a

Andrey Kulikov

06/06/2021, 10:47 AM
please file a bug
t

Tin Tran

06/06/2021, 12:31 PM
So it turns out that this issue is similar to the issue in this thread. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1622755203279600 A bug is already filed
l

Louis Pullen-Freilich [G]

06/06/2021, 1:31 PM
Could you describe your issue?
z

Zan Skamljic

06/06/2021, 1:33 PM
using a plain
FloatingActionButton(onClick = { })
the ripple only appears if the button is pressed for a duration, but doesn't appear for taps, without holding it down
l

Louis Pullen-Freilich [G]

06/06/2021, 1:33 PM
Nothing appears at all if you tap?
z

Zan Skamljic

06/06/2021, 1:34 PM
nope
the ripple is fine with tap+hold though
l

Louis Pullen-Freilich [G]

06/06/2021, 1:34 PM
Does the tap trigger the onClick correctly?
z

Zan Skamljic

06/06/2021, 1:34 PM
yup
instant taps trigger the onclick action just fine
l

Louis Pullen-Freilich [G]

06/06/2021, 1:35 PM
Is this on a real device or emulator?
z

Zan Skamljic

06/06/2021, 1:37 PM
real device, android 12
l

Louis Pullen-Freilich [G]

06/06/2021, 2:02 PM
Hm, I can’t reproduce this exact issue, but it might be similar / the same as the other issue mentioned in the thread. You could try to reproduce with the latest build that has a fix for the other issue which might fix this too: https://ci.android.com/builds/pending/P23409680/androidx/latest/top-of-tree-m2repository-all-P23409680.zip Download and unzip this somewhere, then point to it inside your
allprojects
block like:
allprojects {
    repositories {
        maven {
            url "/path/to/m2repository"
        }
    }
}
And then just change your build number to beta09 instead of beta08
z

Zan Skamljic

06/07/2021, 8:29 AM
this one seems to be working