Rahul Mishra
Rahul Mishra

Reputation: 1559

Ripple effect with attribute selectableItemBackgroundBorderless not working with Android 13 and newer

I want to add Ripple Effect to a view but it seems not working when I added

android:background=”?android:attr/selectableItemBackgroundBorderless”

and it is working as usual when I added

android:background=”?android:attr/selectableItemBackground”

It works with android 12 and older but not work with android 13 and newer. With android 13 and newer only android:background=”?android:attr/selectableItemBackground” is working, But I want the Ripple behavior of android:background=”?android:attr/selectableItemBackgroundBorderless”.

Please help.

Thanks You!

Upvotes: 1

Views: 63

Answers (1)

Sumit Ojha
Sumit Ojha

Reputation: 444

Use this android:background="?android:selectableItemBackgroundBorderless" instead of android:background="?android:attr/selectableItemBackground"

Upvotes: 1

Related Questions