16.12.2010 14:34, Paolo пишет:
I've tried, but I don't like that nine-patch. Maybe I should draw end
substitute my own nine patch. Anyway in this way I can simply manage
it in the Eclipse Layout editor, and that's is good!

Yes, you can certainly use other nine-patches from Android (see my previous message on where to find them), or draw your own:

http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch

The only thing I don't like of the nine-patch way is that I have to
draw one nine-patch for all the time I want to change, for example the
color of the background or the alpha value, while extending
RelativeLayout I can to that by code programmatically. Is it right?

You can change the background from code:

http://developer.android.com/reference/android/view/View.html#setBackgroundDrawable(android.graphics.drawable.Drawable)

http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int)

On the other hand, overriding onDraw does give you complete control, so it's a judgment call on flexibility vs. effort (isn't everything?)

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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

Reply via email to