Skip to content

Instantly share code, notes, and snippets.

@brownsoo
Last active September 11, 2017 08:38
Show Gist options
  • Save brownsoo/396896d436f6eeb2db884a942bec787a to your computer and use it in GitHub Desktop.
Save brownsoo/396896d436f6eeb2db884a942bec787a to your computer and use it in GitHub Desktop.
Ripple effect to drawable in android
<!-- drawable-v21 -->
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item
android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#000000"/>
<corners android:radius="5dp"/>
</shape>
</item>
<item>
<shape>
<corners android:radius="5dp"/>
<solid android:color="#ffaaaa"/>
</shape>
</item>
</ripple>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment