I have a specific drawable that I use as background in my app. It is not a solid color.
Now I want to add rounded corners to this drawable.
I only found the rounded corner available in a shape with a gradient or a solid color as a background but not another drawable.
Is there another easy way of adding rounded corners to a drawable?
Create a layout and set its background to your shape drawable. Wrap that layout around your ImageView (with no padding) The ImageView (including anything else in the layout) will now display with rounded layout shape.
xml file and add an attribute to that TextView, for which you want to add rounded corners. The attribute is android: background=”@drawable/rounded_corner_view”.
Use AQuery to make Drawable or Downloaded images rounded corners.
http://code.google.com/p/android-query/wiki/ImageLoading
Note : This is very effective in doing asynchronous task with images and provides lots of featres.
Download API from here : http://code.google.com/p/android-query/downloads/list
Code to do rounded Corners of an image :
AQuery aq = new AQuery(this);
// Image URL to download
String url = "http://www.vikispot.com/z/images/vikispot/android-w.png";
ImageOptions options = new ImageOptions();
options.round = 15;
aq.id(R.id.image).image(url, options);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With