Evi*_*uck 68

getCount()返回适配器中的项目计数(列表中的总数),getChildCount()是一种ViewGroup返回子视图数量的方法.ListView主动重新使用视图,如果你的列表有1000个项目getCount()将返回1000,getChildCount()- 大约10左右...

  • 为这个答案投票,因为我已经愚蠢到`listview.getChildAt(getCount() - 1)`并得到空指针异常. (2认同)