Created
November 24, 2016 10:25
-
-
Save KarthikKumarBA/eb9588c6a9763a7815332c5b429e1624 to your computer and use it in GitHub Desktop.
Ripple Effect
This file contains hidden or 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" | |
android:color="#ColorCode"> | |
<!--Without mask, it will create a cborderless ripple--> | |
<item android:id="@android:id/mask" | |
android:drawable="@android:color/white"/> | |
</ripple> |
This file contains hidden or 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" | |
android:color="#ColorCode"> | |
</ripple> |
This file contains hidden or 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
<!--Add the following attribute to the views whose ripple animation you want to enable | |
WITH BORDER--> | |
android:background="?android:attr/selectableItemBackground" | |
<!--Enable clickable or set onClickListener--> | |
android:clickable="true" | |
<!--Add the following attribute to the views whose ripple animation you want to enable | |
WITHOUT BORDER--> | |
android:background="?android:attr/selectableItemBackgroundBorderless" | |
<!--Enable clickable or set onClickListener--> | |
android:clickable="true" | |
This file contains hidden or 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
<!--Conrtols the color of the ripple--> | |
<item name="colorControlHighlight">#ColorCode</item> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment