How to get this ellipse shape in android seekbar?

Viewed 52

I'm trying to do a custom circular seekbar but i haven't being able to achieve this shape yet.

enter image description here

The problem is basically that long circle shape because i did a custom circular seekbar before:

enter image description here

This is the code from the second picture:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:shape="ring"
            android:thicknessRatio="16"
            android:useLevel="false">
            <solid android:color="@color/black" />
        </shape>
    </item>


    <item>
        <rotate
            android:fromDegrees="270"
            android:toDegrees="270">
            <shape
                android:shape="ring"
                android:thicknessRatio="16"
                android:useLevel="true">

                <solid android:color="@color/green" />
            </shape>
        </rotate>
    </item>
</layer-list>

I've tried changing the size but it obviously give it a different form:

enter image description here

Does anyone have any clue for me to get this?

0 Answers
Related