How to use Android GradientDrawable

Posted by Janusz on Stack Overflow See other posts from Stack Overflow or by Janusz
Published on 2010-04-19T09:11:16Z Indexed on 2010/04/19 9:13 UTC
Read the original article Hit count: 1033

Filed under:
|
|

I try to use the GradientDrawable to set a gradient to some backgrounds and buttons. Sadly the documentation is not very detailed.

What are the main attributes to configure the gradient? I understand start and endcolor but some of the other attributes could need some explanation.

At the moment I used images as the background for the buttons but a drawable defined in XML would be much nicer.

I try to get a look like this (It is a very light gradient): alt text

© Stack Overflow or respective owner

Related posts about android

Related posts about gradientdrawable