在GridView的机器人每个行不同的列数 [英] Different Column number for each rows in GridView android
问题描述
我在使用GridView控件创建UI。该图像是动态的,因为它是从WebService来了。
I have to create UI using the Gridview. The image are dynamic since it is coming from the webservice .
我可以使用XML,但该项目的零索引处已经有一个完整的图像,然后其余的应该分为列定义列数。
I can define column number using the xml but the item at the zeroth index has to have one full image and then the rest should be divided into columns .
任何帮助AP preciated。
Any Help is appreciated.
推荐答案
我使用的ListView .Added以便ListView的页眉解决它。那么孩子列表视图里面我添加了两个观点。在自定义适配器的getView方法我一个每次递增的位置。
I solved it by using ListView .Added a view to listView Header. Then inside the child for the list view I added two view .In the getView method of the custom adapter I incremented the position by one everytime.
P.S:如果你想用无尽的适配器来实现上述看法,你将不得不寻找一个更好的解决方案。
P.S: If you want to implement the above view using endless adapter you will have to find a better solution.
这篇关于在GridView的机器人每个行不同的列数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!