10-22-2010 05:35 AM
Hi, i am trying to create a button field that is a rounded rectangle, with a gradient. I need to have the gradient have the following format:
Need some advice i have used
to get the basics but im struggling to match the gradient format.
Anyone know of a site or code that could help me
Solved! Go to Solution.
10-22-2010 05:57 AM
I would go for a Custom ButtonField with a Bitmap(as required) as Background...:
You can try, here's what will help you do that...
Hope that Helps....
10-22-2010 06:01 AM - edited 10-22-2010 06:02 AM
Thanks for the help but i should have said that i cant really use images is there any other way of doing it?
if i were to use images how would i handle the different resolutions on the different devices
10-22-2010 09:32 AM
Here is a post a while back (if you searched for 'gradient' you would have found it yourself) which deals with this exact problem:
I was wrong back then about not being able to use drawShadedFilledPath under pre-4.6 (you can!), however, so you should be able to just use the code from the quoted article with minimal modifications (just throw out all setBorder and setBackground calls). My code there, however, shows how to create a gradient color Bitmap yourself, which might be useful for you anyway...