ListView with two items per row

五迷三道 提交于 2019-12-25 02:44:08

问题


I have a listview, and I want something like:

row1: [ item 1 ]

row2: [item2][item3]

row3: [ item 4 ]

row5: [ item 5 ]

etc.

So second and third item to be one next to each other, and other items are standard, one below the other.

I tried to put two items in one row, but that's impossible. I saw this https://github.com/umano/MultiItemRowListAdapter, but it isn't helpful, 'cause I want just two items, others are standard.

Also I tried to make gridview for just two items and listview for others, but then I can't scroll my gridview as I can scroll listview (grid items are always in the screen,I only can scroll my listview, of course). So this would be good if I could somehow connect my grid to list, and to scroll them together, but i can't put scrollview in listview.

Pls help.


回答1:


you need to write a custom gridview adapter



来源:https://stackoverflow.com/questions/19817244/listview-with-two-items-per-row

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