How to define a circle shape in an android xml drawable file

Please follow and like us:

Circle Shape in android xml drawable file

This tutorial is about to explain, how to use <Shape> </Shape> for making circle shape drawable background for any android views.

Let’s see example of circle shape in an android xml drawable file

create circle.xml file in drawable folder and put following things in it.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=""
    <!-- Add Color for background-->
    <solid android:color="#ffffff" />
    <!-- Add Color and width for border-->

        android:color="#ccc" />
    <!-- add radious for rounded shape-->
        android:topRightRadius="2dp" />

Hope you liked our “circle shape in an android xml drawable file” tutorials, thanks. Keep in touch with our blog for upcoming latest Android Development tutorials.

nirav kalola