You set it in the consructor:

GradientDrawable(GradientDrawable.Orientation orientation, int[]
colors)



On Jun 28, 4:47 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> How about GradientDrawable instead?
>
> http://developer.android.com/reference/android/graphics/drawable/Grad...
>
> ( I don't see any methods to set gradient colors, though )
>
> -- Kostya
>
> 28.06.2011 12:40, Paolo пишет:
>
> > Hi SofB thanks for your answer.
> > I did it, but the problem is here. From ShapeDrawable object I don't
> > figure out how to set the gradient color in the shape. Maybe I miss
> > something, please give me a tip.
> >http://developer.android.com/reference/android/graphics/drawable/Shap...
>
> > On 27 Giu, 16:26, Streets Of Boston<flyingdutc...@gmail.com>  wrote:
> >> Depends.
> >> Let's say you attach this drawable as the background of some View.
> >> Call 'getBackgroundDrawable()' on this one and cast it to the correct
> >> sub-class of Drawable. In your case that would be ShapeDrawable. Then
> >> consult the online documentation to navigate your way to access and change
> >> the gradient.
>
> --
> Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to