Ripple Button(Custom Layout) In Android Studio

Amazing UI Attracts Most Of the Users whether developing a website or Mobile Application. Ripple Effect is one of the very flattering way to take a step towards amazing UI. To Create A ripple effect in android studio you have to create a custom layout file in drawable folder.

Use this Drawabe file toAdd Ripple effect to any layout or attribute in android studio.

Create A New Drawable Resource File. In ButtonRipple.xml write following code:

<ripple xmlns:android="" android:color="@color/colorOther2"> <item android:state_pressed="false"> <shape android:shape="rectangle"> <solid android:color="@color/colorPurple4"/> <corners android:radius="50dp"></corners> </shape> </item> <item android:state_pressed="true"> <shape android:shape="rectangle"> <solid android:color="@color/background_image"/> <corners android:radius="50dp"></corners> </shape> </item> </ripple>

Now in your Activity Layout MainActivity.xml write this:

Run Your Application and Click On Button to see Ripple Effect. Please Like And Share!

How useful was this post?

Do not forget to rate! this helps us to Improve.

Average rating / 5. Vote count:

Read More Like This..

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!


Safiya Akhtar

Safiya Akhtar is Android Application Developer in India. She is currently working as a public consultant for career and education too, besides blogging and freelancing. She believes that it is never too late or too early to start what you have always dreamed of.

Your Views And Question are Welcome Here!