如何将文本添加到图像中网格视图? [英] How to add text to image in grid view?

查看:111
本文介绍了如何将文本添加到图像中网格视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我有G​​ridView控件,它就会从服务器和放大器的图像;在GridView中显示出来,
我想相关的文本添加到每个image.it必须看起来像下面的图片。
如何才达到的?

well i have gridview , which pulls the images from server & display it in gridview, i want to add related text to each image.it must look like the below image. How to achive that ?

推荐答案

为了填补一个GridView你必须创建一个项目(XML布局);
然后在适配器,你会得到膨胀,并填满它;
所以你可以只是为了创建图像的的FrameLayout,并具备重力底部和背景#66666666一个TextView,其中#AARRGGBB AA-是阿尔法香奈儿(transparecy);

in order to fill a GridView you got to create an item(Xml layout); then in the adapter you'll got to inflate it and fill it up; so you are able just to create a FrameLayout with an image and a textView with gravity bottom and background #66666666 where #AARRGGBB AA-is an alfa chanel(transparecy);

这篇关于如何将文本添加到图像中网格视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆