Android – How to define a circle shape in an Android XML drawable file


I have some problems finding the documentation of the definitions of shapes in XML for Android. I would like to define a simple circle filled with a solid color in an XML File to include it into my layout files.

Sadly the Documentation on does not cover the XML attributes of the Shape classes. I think I should use an ArcShape to draw a circle but there is no explanation on how to set the size, the color, or the angle needed to make a circle out of an Arc.

Best Solution

This is a simple circle as a drawable in Android.

<?xml version="1.0" encoding="utf-8"?>