Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge two shapes in a single gradient android

enter image description here

how to merge border or single gradient in both.how to possible??

Already tried this background shape as below :- shape.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
    android:top="175dp">
    <shape android:shape="oval">
        <gradient
            android:angle="135"
            android:startColor="#f56f2c"
            android:endColor="#fa9f46"/>

    </shape>

</item>
<item
    android:bottom="40dp"
    >
    <shape android:shape="rectangle">
        <gradient
            android:angle="135"
            android:startColor="#f56f2c"
            android:endColor="#fa9f46"/>
    </shape>
 </item>
</layer-list>
like image 541
SAOUD SALIH HASSAN Avatar asked Nov 14 '25 23:11

SAOUD SALIH HASSAN


1 Answers

I solved the problem...the gradient angle change to 90.the matter is keeps the colours variation together item borders.fixed to same colour each boarder.

example:

<item
    android:top="165dp">
    <shape android:shape="oval"
      >
        <gradient
            android:angle="0"
            android:startColor="#C96DD8"
            android:centerColor="#C96DD8"
            android:endColor="#C96DD8"/>

    </shape>
</item>
<item
    android:bottom="40dp">
    <shape android:shape="rectangle">
        <gradient
            android:angle="-90"
            android:startColor="#3023AE"
            android:centerColor="#7344ac"
            android:endColor="#C96DD8"/>
    </shape>
</item>
like image 149
SAOUD SALIH HASSAN Avatar answered Nov 17 '25 19:11

SAOUD SALIH HASSAN



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!