I have a FrameLayout that has a ripple effect on click. To do this I have this tag on my FrameLayout:
android:foreground="?attr/selectableItemBackgroundBorderless"
The problem is that I get an error that says: "Cannot resolve symbol '?attr/selectableItemBackgroundBorderless'". Despite the error, I can still run the project and the FrameLayout has the effect I want.
But if I try to had this tag instead:
android:foreground="?android:attr/selectableItemBackgroundBorderless"
I get another error. It says that this tag requires API level 21.
So my question is, what is the right way to do this? Should I keep using the one that cannot resolve symbol and ignore the error? Is there any other way to have a similar behaviour with another tag?