Gradient Color difference in Toolbar and Oval Shape

20 views Asked by At

I am using gradient for my Toolbar and using a Oval Shape below the toolbar like this below:

enter image description here

This is my toolbar gradient:

<?xml version="1.0" encoding="utf-8"?>

<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <gradient
        android:type="linear"
        android:startColor="@color/tabstart"

        android:endColor="@color/tabend"
        android:angle="0"
        />

</shape>

and this is my Oval Shape:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item>
        <shape android:shape="rectangle">

            <size
                android:width="100sp"
                android:height="100sp" />

            <solid
                android:color="@android:color/transparent" />
        </shape>
    </item>

    <!-- Top WHITE oval shape -->
    <item
        android:left="-25dp"
        android:right="-25dp"
        android:top="-55dp"
        android:bottom="50dp">

        <shape android:shape="oval">


            <gradient
                android:type="linear"
                android:startColor="#C31432"
                android:endColor="#240B36"
                android:angle="0"
                />
        </shape>
    </item>
</layer-list>

But still there is minor difference in matching the color, there is a minor line which is displaying the oval is separated which is not looking as a good ui. what to do here to match the complete gradient?

0

There are 0 answers