I am using
android:background="?android:attr/selectableItemBackground"
to add ripple effect when items of a recyclerview are touched. I do display an action bar when an list item is long clicked. However the that item is not highlighted anymore. I used to have a selector
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape>
<solid android:color="@color/selector"/>
</shape>
</item>
<item android:state_pressed="true">
<shape>
<solid android:color="@color/selector"/>
</shape>
</item>
<item>
<shape>
<solid android:color="@android:color/transparent"/>
</shape>
</item>
</selector>
as background in order to highlight the selected item but because I wanted to have the ripple animation I have gone for the selectableItemBackground stuff. There are some posts here showing how to write a ripple file save in a folder with a 21 file extensions. However the ripple tag is only available with API Level 21 and above. Since I would like to have a brighter device coverage than just api level 21 and above, I was wandering whether there is another to combine my selector with the ripple stuff.
Thanks