开发者

specify the postion of a text & and an image in a botton [android]

开发者 https://www.devze.com 2023-01-18 17:38 出处:网络
i asked the question about haw to create a button by a text & an image Button contains text & image from the Internet [android]

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

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 thei开发者_高级运维r place??

thanx


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消