在android中实现双向listview的正确方法

时间:2015-08-19 19:15:43

标签: android listview android-listview android-adapter horizontallistview

我正在尝试创建一个列表视图,其中每行应该是水平列表视图。我需要动态添加项目。例如,如果我的水平列表视图中的每个项目都可以表示为类,那么我应该能够创建一个显示ArrayList of Item的适配器,而且我应该能够创建垂直列表视图的适配器,显示包含ArrayList的{​​{1}}。是否有适当,标准和清洁的方法使其有效?

1 个答案:

答案 0 :(得分:1)

I suggest you take a look at VerticalHorizontalListView and twoway-view libraries that implement such list view and of course this link might be a help, which explains how to implement Dynamic Shelfview in Android.

I found this post on SO : Horizontal ScrollView in List View Item Android which explains the issue prefectly, you can take a look at that too. I hope this links help you ;)