Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android rectangle background gradient

I want to crate a background gradient that goes from the inside to outside. And at the outside it should be getting darker. Here is an image:

enter image description here

Can anyone give me some advice how I can create something like that? Or should I take an image for this? If yes, what's about different screen resolutions? Or about landscape / portrait modus?

like image 973
MyNewName Avatar asked Jul 29 '26 11:07

MyNewName


1 Answers

use this change color as required

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
    <gradient
        android:type="radial"
        android:startColor="#f15330"
        android:endColor="#da0000"
        android:gradientRadius="150dp"
        />
   <size android:height="400dp"
       android:width="250dp"/>
</shape>
like image 130
Ashish Pardhiye Avatar answered Aug 01 '26 01:08

Ashish Pardhiye



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!