Created
July 1, 2017 16:50
-
-
Save tank777/02473bc45ff72faf36b50487218f9ac5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ripple effect API 21 --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<ripple | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:color="@color/colorRipple"> <!-- ripple color --> | |
<!-- for Button --> | |
<item> | |
<shape android:shape="rectangle"> | |
<corners android:radius="3dp" /> | |
<solid android:color="@color/colorPrimary"/> | |
</shape> | |
</item> | |
</ripple> | |
<!-- ripple effect < API 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"> | |
<corners android:radius="3dp" /> | |
<solid android:color="@color/colorRipple" /> | |
</shape> | |
</item> | |
<item android:state_focused="true"> | |
<shape android:shape="rectangle"> | |
<corners android:radius="3dp" /> | |
<solid android:color="@color/colorPrimary" /> | |
</shape> | |
</item> | |
<item> | |
<shape android:shape="rectangle"> | |
<corners android:radius="3dp" /> | |
<solid android:color="@color/colorPrimary" /> | |
</shape> | |
</item> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment