You need to create a drawable shape in the dropdown folder that looks something like this:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" > <gradient android:startColor="#FFFF0000" android:endColor="#80FF00FF" android:angle="270"/> </shape>
(In this example, I saved drawable as circle.xml and it will have a gradient fill)
Then in your layout you need to define the view and set the form as the background:
<View android:layout_width="50dp" android:layout_height="50dp" android:background="@drawable/circle"/>
The view determines the size and dimensions of the form.
Edit - Screenshots of the code result


Graham Smith Apr 11 2018-12-12T00: 00Z
source share