Created
August 9, 2021 14:25
-
-
Save Audhil/1fe7e638bfdc590ab9e990b3f4270efd to your computer and use it in GitHub Desktop.
adding ripple in rounded corner btns - usage: android:background="@drawable/rounded_corner_ripple_btn"
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:color="@color/black_10" | |
tools:targetApi="lollipop"><!-- ripple effect color --> | |
<!-- background color --> | |
<item android:id="@android:id/background"> | |
<shape android:shape="rectangle"> | |
<solid android:color="@android:color/transparent" /> | |
</shape> | |
</item> | |
<item> | |
<shape android:shape="rectangle"> | |
<solid android:color="@color/white" /> | |
<corners android:radius="360dp" /> | |
<stroke | |
android:width="1dp" | |
android:color="@color/colorAppSecondary" /> | |
<padding | |
android:bottom="2dp" | |
android:left="8dp" | |
android:right="8dp" | |
android:top="2dp" /> | |
</shape> | |
</item> | |
</ripple> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment