你如何使用ArrayAdapter的Horizo​​ntalListView [英] How do you use an ArrayAdapter for a HorizontalListView

查看:193
本文介绍了你如何使用ArrayAdapter的Horizo​​ntalListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的是Horizo​​ntalListView,我使用addView方法添加项目。
有没有一种方法来填充一个ArrayAdapter一个Horizo​​ntalListView以同样的方式,你可以为一个ListView,这始终是垂直的?

I'm currently using a HorizontalListView which I add items to by using the addView method. Is there a way to populate a HorizontalListView with an ArrayAdapter in the same way as you can for a ListView, which is always vertical?

推荐答案

我假设你的意思是你正在使用Horizo​​ntalScrollView,因为没有这样的东西作为Horizo​​ntalListView。如果你想实现你的最好的拍摄是创建该类型的ListView自己,即。通过子类化 AbsListView 适配器视图。或者你可以只用偷别人code,这样水平的ListView :)

I assume you meant you are using HorizontalScrollView, because there is no such thing as HorizontalListView. If you want to accomplish that your best shot is to create that type of ListView yourself, ie. by subclassing AbsListView or AdapterView. Or you could just use somebody elses code, like this Horizontal ListView :)

这篇关于你如何使用ArrayAdapter的Horizo​​ntalListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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