如何在android中为每一行设置gridlayout的背景图像? [英] How to set the background image of gridlayout for each row in android?

查看:112
本文介绍了如何在android中为每一行设置gridlayout的背景图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应用程序,在该应用程序中我不想用不同的图像设置每一行gridlayout

I am building an application in which i wantt to set each row of gridlayout with different image

推荐答案

具有图像文件路径/URL的数组列表,并可以从您的getView方法内部进行调用,例如

Have a array list of images file path/url and simply call it from inside your getView method like

layoutName.setBackground(imageList.get(position));

这篇关于如何在android中为每一行设置gridlayout的背景图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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