How to make a circular ripple on a button when it's being clicked?

If you are using AppCompat theme, then you could set the background of the view as:


This will add circular ripple on 21 and above and square background on below 21.

Another attribute with round ripple effect, specially for action bar:


UPD: Ripple color can be changed by this attribute:

<!--somewhere in styles-->
<item name="colorControlHighlight">your_color_here</item>

But keep in mind, this attribute applies to all default ripple effects.

Create and set a ripple drawable as background. Something like this.

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android=""
    <item android:id="@android:id/mask">
        <shape android:shape="oval">
            <solid android:color="?android:colorPrimary"/>
        <color android:color="@color/white"/>