How to make the corners of a button round in Android?
This example demonstrates how to make the corners of a button round in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
Step 3 − Add the following code to src/MainActivity.java
Step 4 − Add the following code to res/drawable/mybutton.xml.
Step 5 − Add the following code to Manifests/AndroidManifest.xml
Let's try to run your application. I assume you have connected your actual Android Mobile device with your computer. To run the app from the android studio, open one of your project's activity files and click Run icon from the toolbar. Select your mobile device as an option and then check your mobile device which will display your default screen −
Как сделать круглую кнопку в android studio

There is no default attribution to make a button round in Android Studio. So to do that we have to add a new XML file to make the button round.
Drawable > New > Drawable Resource File (example: rounded_corner.xml)
Color and corner radius for the button can be modified as per your needs. The changes you make can be seen in the design option in the side:

Now , in the main xml file where you want the rounded corners for the button , add this line : android:background=”@drawable/rounded_corner ” .
На рисунке:
Как сделать так чтоб клики по красной области не обрабатывались? 
How to make a round button?
I’m trying to make a round button, but I don’t know how can I do it. I can make button with rounded corners, but how can I can round circle. It’s not the same. Please, tell me, is it possible on Android? Thank you.
23 Answers 23
Create an xml file named roundedbutton.xml in drawable folder
Finally set that as background to your Button as android:background = «@drawable/roundedbutton»
If you want to make it completely rounded, alter the radius and settle for something that is ok for you.
If using Android Studio you can just use:
this works fine for me, hope this helps someone.
![]()
Create a drawable/button_states.xml file containing:
Use it in button tag in any layout file
(This library is deprecated and no new development is taking place. Consider using a FAB instead.)
![]()
If you want a FAB looking circular button and you are using the official Material Component library you can easily do it like this:

If you change the size of the button, just be careful to use half of the button size as app:cornerRadius .
Set that on your XML drawable resources, and simple use and image button with an round image, using your drawable as background.
![]()
and add this to the button code
Used the shape as oval. This makes the button oval
![]()
You can make a ImageButton with circular background image.
use ImageButton instead of Button.
and make Round image with transparent background
![]()
You can use a MaterialButton :
and apply a circular ShapeAppearanceOverlay with:

For a round button create a shape:
use it as a background of your button link
Just use the MaterialButton
- width equal height
- cornerRadius is half of the width or height
Yes it’s possible, look for 9-patch on google. Good articles :
You can use google’s FloatingActionButton
I simply use a FloatingActionButton with elevation = 0dp to remove the shadow:
![]()
I like this solution
![]()
look into built in android drawables:
- Use the Image Buttons and make the background as the image you want.
- Create the images from the android asset studio link —
and download it, extraxt it , inside that look for mipmap-hdpi folder.
copy the image from the mipmap-hdpi folder and paste it in the drwable folder of your android project.
Now set the background as that image.
I went through all the answers. But none of them is beginner friendly. So here I have given a very detailed answers fully explained with pictures.
Open Android Studio. Go to Project Window and scroll to drawable folder under res folder

Right click, select New —> drawable resource folder

In the window that appears, name the file rounded_corners and click on OK

A new file rounded_corners.xml gets created
Open the file. You are presented with the following code —>

Replace it with the following code —>

Here the design view can be seen on the right side
Adjust the value in android:radius to make the button more or less rounded.
Then go to activity_main.xml
Put the following code —>
Here I have placed the Button inside a RelativeLayout . You can use any Layout you want.
For reference purpose MainActivity.java code is as follows —>
I have a Pixel 4 API 30 avd installed. After running the code in the avd the display is as follows —>
Android Studio Creating Circle Button
your API Level,for this article iam using API Level 22.
After creating of Android Project, you need to create a new Drawable Resource File in your
drawable folder, because we are going to add some design and colors for our button.
iam going to call my file circle_button.xml.

Android Drawable Resource File
Rounded Button in Android Studio
There is no default attribution to make a button round in Android Studio. So to do that we have to add a new XML file to make the button round.
Drawable > New > Drawable Resource File (example: rounded_corner.xml)
Color and corner radius for the button can be modified as per your needs. The changes you make can be seen in the design option in the side:
Now , in the main xml file where you want the rounded corners for the button , add this line : android:background=”@drawable/rounded_corner ” .