Kevin Patel
Kevin Patel

Reputation: 1

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

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>

Upvotes: 0

Views: 22

Answers (0)

Related Questions