ListView:
| java.lang.Object | |||||
| ↳ | android.view.View | ||||
| ↳ | android.view.ViewGroup | ||||
| ↳ | android.widget.AdapterView<T extends android.widget.Adapter> | ||||
| ↳ | android.widget.AbsListView | ||||
| ↳ | android.widget.ListView | ||||
原意:
view that shows items in a vertically scrolling list. The items come from the ListAdapter associated with this view.
译文:
view展示一系列选项可以滚动的列表。这些一些列选项都是和ListAdapter联系起来的。
主程序代码:
主程序对应的布局:
代码控制显示数据:
布局文件控制数据显示:
布局文件:
自定义显示ListView数据
自定义显示xml文件
效果展示:


代码示例:
本文介绍ListView在Android中的使用方法,包括通过代码和布局文件控制数据显示,以及如何自定义ListView的显示形式。

被折叠的 条评论
为什么被折叠?



