I have the following xml
in drawable folder (circle_status.xml
) to create a ring:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:innerRadius="15dp"
android:thickness="10dp"
android:useLevel="false">
<solid android:color="#ababf2" />
</shape>
And I insert the drawable as a background for a RelativeLayout, as next:
<RelativeLayout
android:id="@+id/RelativeLayout_Status"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/circle_status" />
The problem is that a circle appears in the RelativeLayout, not a ring.