tags:

views:

35

answers:

1

Hi,

Instead of using in my layout ImageView and TextView I am now adding the image like this:

text.setCompoundDrawablesWithIntrinsicBounds(0, mImagesId[position], 0, 0);

In order to add border to the ImageView I defined a shape xml that I am using as a BackgroundResource. How can I now add the shape to the TextView image up compound ?

Thanks

+1  A: 

You can create a layered drawable that contains the shape you want + your image. See the LayerDrawable class for more info.

Romain Guy
Thanks very much :)
chen