我有我的自定义列表视图,并且在每一行的末尾我有 ImageView 从列表中删除该行但是当我单击此图像时,我得到“Arryindesoutofboundexception:长度 = 681 indez = -1”
帮我
private OnClickListener imageviewClickListener = new OnClickListener() {
@Override
public void onClick(View v)
{
int index;
index=listView.getSelectedItemPosition();//itemsListView is the listview
dataAdapter.remove(topicsList.get(index));
topicsList.clear();
dataAdapter.notifyDataSetChanged();
}
};