Rounded Corners in Android Layouts

To get rounded corners on layouts or layout elements in Android you can use the shape drawable to stay flexibel without the need to recreate Nine-Patch-Drawables everytime your layout changes a bit. See the Documentation-Section for all attributes.

Implementation of a dashboard button with rounded corners:

Android rounded corners example

Create the file dashboard_button_background.xml in res/drawable:

and use it where you like to in your layout xml file: