How to set the background image of gridlayout for each row in android?

依然范特西╮ 提交于 2021-02-10 13:15:30

问题


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


回答1:


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

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


来源:https://stackoverflow.com/questions/5828044/how-to-set-the-background-image-of-gridlayout-for-each-row-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!