Gradient like that?

I am not a UI designer, so I can’t feel the xml colors enough, I want to make the gradient like this:

http://t1.uccdn.com/en/images/6/5/2/img_2256_ins_45517_600.jpg

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape>
        <gradient
            android:startColor="#1f313d"

            android:endColor="#2c3942"
            android:angle="135"/>
    </shape>
</item>

but ... I think that two colors are not enough, how to make it look like a gradient on this image? * last screen

+4
source share
2 answers

How to create a gradient?

Creating a gradient is easy.

  • Right-click on the folder drawableand create the file xml.

  • Create form tag

  • Create a gradient tag inside the form tag

Gradient Properties ........

android:startColor="put here your color"
android:endColor="put here your color"
android:centerColor="put your color here"
android:angle="45"

if you need gradient in

horizontal way to put angle = "0"

vertical path rotation angle = "90"

= "45"

= "135"

.......

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

    <gradient android:startColor="#915d5b"
        android:endColor="#418c47"
        android:angle="45"></gradient>
</shape>

output

.......

+8

Gradient Generator AngryTools, .

+1

All Articles