Round shape - How to make layout and ui control in round shape

Download rounded corner border sample

We can add corner rounded border to any view like Button, TextView etc. and layout. In this example I have added rounded corner border to a Button, TextView and a TableLayout.

Round button

Create a xml file under your drawable folder with following code. In my example, I've named it round_shape.xml

Android LinearLayout file of above example is given below:

Now, create a layout file where you want to make rounded corner border. In my case, name of my layout file is activity_main.xml. Source of this file is given below...

Share & Like

Tutorial topics

About is for Java, J2ee, Html5 and android developers. All tutorials are well explained and are easy to understand. We have tested every tutorials on our developement environment before posting it in public domain.