How to change duration of ripple effect in Android?

android ripple mask
android ripple effect on click
android button ripple effect with background color
circular ripple effect android github
ripple-pulse animation android
ripple effect in android example
reality ripple effect android
how to change ripple effect color in android

I have implemented a ripple effect in android. Using the following code:-

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android=""
    <item android:drawable="@android:color/black" />

And set it to the background of a textview


But the problem is that the ripple animation is very fast. I want to slow it down.

You can achieve the same effect by setting this as a background to the view:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android=""
            <solid android:color="@color/chrome_grey" />
            <solid android:color="@android:color/white"/>

Ripple Animation, Edit PagePage History. Overview. Ripple touch effect was introduced with material design in Android 5.0 (API level 21). The default ripple animation takes place in a fraction of a second, but the length of the animation can be customized for� Standard bounded Ripple Effect Standard Unbounded Ripple Effect. Setting CUSTOMISED Ripple effect on Android 5.0: API 21(LOLLIPOP) devices : We create a touch feedback drawable that shows a ripple effect in response to state changes, using the ripple as root element.

I have used this Library called as RippleEffect.

Its very easy to use and provides bunch of modification and customization.

app:rv_rippleDuration [integer def:400] --> Duration of the ripple animation

You can play around with various options.

RippleDrawable, And then, we set our required color to the rippledrawable object. 1. By XML. Setting DEFAULT Ripple effect on Android 5.0: API 21(LOLLIPOP)� Implementation of Ripple effect from Material Design for Android API 9+ RippleEffect ExpandableLayout provides an easy way to create a view called header with an expandable view.

Use below code for ripple effect;


<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="">
    <stroke android:width="1dp" android:color="#FFF" />

    <solid android:color="@color/color" />

        android:topRightRadius="0dp" />
<ripple xmlns:android=""
    android:color="#ffff0000" />

Ripple effect in Android, here i provide screenshot for better understanding. let's start with this following step. 1)add project name,package(if you want to change) and� Android default button comes with a touch like ripple effect animation that starts from the point of contact and grows outward. It is a cool effect to have in android but when you set a color value to android button background attribute, the ripple effect attached to the button goes away.

how to make custom ripple effect in android using “ripple drawable , Before API 21 (Android 5.0 Lollipop), clicking a RecyclerView item just changed its background color (no ripple effect). That is what we are� Implementation of Ripple effect from Material Design for Android API 9+ - traex/RippleEffect

Adding a ripple effect to an Android RecyclerView item, Check this : traex/RippleEffect RippleEffect ExpandableLayout provides an easy way to create a view called How do I edit an existing app on Android Studio? Change the background color using android:backgroundTint <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:backgroundTint="@color/yellow" android:text="Yellow Tint Button" /> By using the android:backgroundTint, your button gets the color and the ripple effect. Unfortunately, this works only on API21+.

How to create ripple effect on button in Android studio, We allow for change in colour, size and fill type. We also allow for a duration though we wont use it in the example below. If duration is left out, a� Trying to do something really simple here and have looked up a bunch of SO resource, but to no avail. I am trying to get the ripple effect on a button which uses a drawable background of type of sh

  • Got any solution to this ?
  • @karthikkolanji don't remember, I think I didn't.
  • Drawables can do so much more than I thought! Great answer
  • which tag is used for duration here?