ListView中,每行两个项目 [英] ListView with two items per row

查看:169
本文介绍了ListView中,每行两个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表视图,我想是这样的:

I have a listview, and I want something like:

ROW1:[项目1]

row1: [ item 1 ]

ROW2:[ITEM2] [项目3]

row2: [item2][item3]

ROW3:[项目4]

row3: [ item 4 ]

row5:[项目5]

row5: [ item 5 ]

等。

于是第二和第三项是一个接一个地彼此和其他项目都是标准,以下任一其他

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

我试图把两个项目在一个行,但是这是不可能的。我看到这个 https://github.com/umano/MultiItemRowListAdapter ,但它是没有帮助的。因为我想只有两个项目,其他都是标准配置。

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.

我也试图让只是两个项目和ListView他人的GridView,但我不能滚动我的GridView的,因为我可以滚动列表视图(网格项目总是在屏幕上,我只可以滚动列表视图我当然)。因此,这将是一件好事,如果我能我莫名其妙电网连接列表,并在一起滚动,但我不能把滚动视图列表视图中的

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.

请帮助。

推荐答案

您需要编写一个自定义的gridview的适配器

you need to write a custom gridview adapter

这篇关于ListView中,每行两个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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