Button in Android

The buttons are important widget in Android and by default it has a rectangular shape. In this tutorial we learn about how to create round corner button, oval button and capsule shape of  button. First of all create a xml file  in a drawable folder and call it as a background into code of button widget. I have named it as round_corner, oval and capsule shape respectively.


Now call it as a background of button in Button code.
Button Code


Round corner button circular button oval button android

round corner button

Similarly we can do it for oval shape of button.


Similarly we can also create capsule or cylindrical like button in Android.


Source: Offical documentation of Android