Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
API level >= 21
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/fill_color_when_pressed">
<item>
<selector>
<item android:state_checked="true" >
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_active" />
<corners android:topRightRadius="@dimen/corner_radius" android:bottomRightRadius="@dimen/corner_radius"/>
</shape>
</item>
<item android:drawable="@android:color/transparent"/>
</selector>
</item>
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_pressed"/>
<corners android:topRightRadius="@dimen/corner_radius" android:bottomRightRadius="@dimen/corner_radius"/>
</shape>
</item>
</ripple>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment