Question: I am trying to create a gradient which will look similar to the one in the left, but I couldn't in this code using XML. Please help me to achieve this

I have tried using alpha, but I don't know how to control the color distribution
XML Code:

```
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="oval">
            <gradient
                android:gradientRadius="70dp"
                android:centerX="50%"
                android:centerY="50%"
                android:centerColor="#73F76394"
                android:startColor="#00F76394"
                android:endColor="#F92965"
                android:type="radial" />

            <size android:height="120dp" android:width="120dp">
            </size>
        </shape>
    </item>
</selector>

```

I expect a different output

output obtained:

[![output obtained](https://i.stack.imgur.com/8MYul.png)](https://i.stack.imgur.com/8MYul.png)

expected output:

[![expected output](https://i.stack.imgur.com/ROyNt.png)](https://i.stack.imgur.com/ROyNt.png)

Please help

Answer: 
Please try below code. 

```
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="oval">
            <gradient
                android:gradientRadius="90dp"
                android:centerX="50%"
                android:centerY="50%"
                android:centerColor="#202E53"
                android:startColor="#00F76394"
                android:endColor="#F92965"
                android:type="radial" />

            <size android:height="120dp" android:width="120dp">
            </size>
        </shape>
    </item>
    <item android:top="30dp" android:bottom="30dp" android:left="30dp" android:right="@dimen/dimen_30">
        <shape android:shape="oval">
            <solid android:color="#202E53" />

            <size android:height="90dp" android:width="90dp">
            </size>
        </shape>
    </item>
</layer-list>

```

Output :

[![enter image description here](https://i.stack.imgur.com/IUeiL.png)](https://i.stack.imgur.com/IUeiL.png)
Use this,

```
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="oval">
            <gradient
                android:gradientRadius="70dp"
                android:centerX="50%"
                android:centerY="50%"
                android:centerColor="#00F76394"
                android:startColor="#00F76394"
                android:endColor="#F92965"
                android:type="radial" />

            <size android:height="120dp" android:width="120dp">
            </size>
        </shape>
    </item>
</selector>

```

you will have to keep the **centerColor** and **startColor** same to achieve this