views:

23

answers:

1

i asked the question about haw to create a button by a text & an image

http://stackoverflow.com/questions/3828906/button-contains-text-image-from-the-internet-android

it was very helpful.But, the problem is : i want a button contains the image & under it the text (not as background) am looking how to add this image as the text and specify their place??

thanx

A: 

You can try creating LayerDrawable with two layers: transparent (size of the button) and your image on top and set it as background. Then add text as a caption and use gravity = bottom to position it.

Asahi
thank u, very useful
ilredelweb