How to specify android:state_selected
inside a RippleDrawable
I have following xml for ripple drawable but background color doesn't show up when I set myView.setSelected(true);
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#DDDDDD"
>
<item android:id="@android:id/mask">
<shape>
<solid
android:color="@color/black" />
</shape>
</item>
<item android:state_selected="true">
<shape>
<solid
android:color="#EEEEEE" />
</shape>
</item>
<item>
<color android:color="#FFFFFF" />
</item>
</ripple>