Android Question Gradient drawable from sides to center

Descartex

Well-Known Member
Licensed User
Longtime User
Hi, friends!!!
A very exigent client asked my to put a Gradient from sides to center on a layout full of buttons...
Does anyone can show me how to implement it?
I was looking for it and had no sucess.
Thanks in advance.
 

Geezer

Active Member
Licensed User
Longtime User
 
Upvote 0

derez

Expert
Licensed User
Longtime User
When creating a gradientdrawable by code you have to supply an array of colors, this array can hold any number of colors and the gradient will follow the order.
 
Upvote 0

Descartex

Well-Known Member
Licensed User
Longtime User
Thanks to all of you!!!
Finally I've done it by the easiest way, a background image.
Runtime solutions didn't liked me
 
Upvote 0
Top