ExpandableListViewAdapter can't override getItemViewType
I have a class that extends BaseExpandableListAdapter.
public class ExpandableListAdapter extends BaseExpandableListAdapter
In the listview my items are reused, and I'd like to prevent that.
I've learned that using IGNORE_ITEM_VIEW_TYPE would prevent the OS to
reuse them, but I have to use it in the getItemViewType method.
When I added this code:
@Override
public int getItemViewType(int position) {
return 0;
}
I have the following error:
Method does not override method from its superclass.
How can I use the setting to prevent my ExpandableList to reuse items?
No comments:
Post a Comment