android开发

专注于android开发

导航

2009年11月30日 #

ListView.getCount() 与 ListView.getChildCount()

摘要: ListView.getCount()(实际上是 AdapterView.getCount()) 返回的是其 Adapter.getCount() 返回的值。也就是“所包含的 Item 总个数”。 ListView.getChildCount()(ViewGroup.getChildCount) 返回的是显示层面上的“所包含的子 View 个数”。 二者有什么不同?当 ListView 中的 Item 比较少无需滚动即可全部显示时,二者是等价的;当 Item 个数较多需要滚动才能浏览全部的话,getChildCount() < getCount() 其中 getChildCount() 阅读全文

posted @ 2009-11-30 15:44 android开发 阅读(229) 评论(0) 推荐(0)

大连网站建设、大连做网站、大连网站建设、大连网站设计、大连做网站电话、大连做网站。