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"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<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>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment