Monday, June 27, 2011

[android-developers] Re: Change grandient color for a shape programmatically

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.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment