问题
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