I am new to Android. I am working on the UI Designs of an app. I couldn't achieve the result by following the layer-list. I have to apply gradient coloring to a Image button.gradient color button I have to do.
My Resource file:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="30dp"/>
<gradient
android:angle="270"
android:startColor="#1d976c"
android:endColor="#1d976c"
android:centerColor="#001510"
android:gradientRadius="5dp"
android:centerX="20%"/>
<size
android:height="100dp"
android:width="50dp"/>
</shape>
Gradient background which I did How can I get center black colour & top and bottom of same length coloring.?