Wednesday, August 3, 2011

[android-developers] Re: How to make an ordinary view to have rounded corners in code without xml

...and the background drawable could be a GradientDrawable, which has
built-in support for rounded corners.

On 2 Aug, 16:50, "nEx.Software" <email.nex.softw...@gmail.com> wrote:
> Just provide a background drawable that has rounded corners. There is no
> magic there. The View will still have a rectangular box model (that's just
> how views are), but the parts of the background that are transparent will be
> transparent. Unless you are looking to create the image in code, there
> really is no reason not to just set the background of the view to an image
> you have already created. It's not really any different than the "ListView
> with rounded corners" except you aren't using XML to define the drawable.

--
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