How to add a ripple effect on a layout with rounded corners? [duplicate]
Asked Answered
O

1

14

I want to set a ripple effect on layout with rounded corners. How can I do it?

Outrun answered 27/2, 2017 at 10:15 Comment(1)
github.com/traex/RippleEffectEverest
T
-4

just set these properties in xml file

android:background="?android:attr/selectableItemBackground"
android:clickable="true"

That should do it.

Tina answered 27/2, 2017 at 10:19 Comment(3)
This does not make the layout border corner round.Outrun
then try android:foregroud="?android:attr/selectableItemBackground" insteadTina
@ChetanAshtivkar android:foregroud="?android:attr/selectableItemBackground" doesn't work eitherHerrera

© 2022 - 2024 — McMap. All rights reserved.