How To Create Drawable Border like some top portion some bottom Portion?

16 Views Asked by At

enter image description herePlease Help me to create below image to draw border in drawable using redial gradient with different color. i already try but not create border like this. i have attached the sample image.

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="30dp"/>
            <solid android:color="#FF57F2" /> <!-- border color -->
        </shape>
    </item>

    <item

        android:start="10dp"
        android:end="16dp">   <!-- adjust borders width here -->
        <shape android:shape="rectangle">
            <corners android:radius="30dp"/>
            <solid android:color="#FBFBFB" />  <!-- background color -->
        </shape>
    </item>
</layer-list>
0

There are 0 best solutions below