这个报错编译器没有提示代码哪里错了,害我找半天找不出问题出在哪里,最后将BaseAdapter的每一个重写函数注释掉再运行才找出问题所在,如下图(代码是已更正的)
在android sdk文档中有说明:
public int getItemViewType (int position)
Returns
- An integer representing the type of View. Two views should share the same type if one can be converted to the other in
getView(int, View, ViewGroup)
. Note: Integers must be in the range 0 togetViewTypeCount()
- 1.IGNORE_ITEM_VIEW_TYPE
can also be returned.
以此为记。