baoyongzhang / baoyongzhang/SwipeMenuListView
为什么我滑动点击删除之后 下一个item被打开了?
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
@Override
public boolean onMenuItemClick(int position, SwipeMenu menu, int index) {
switch (index) {
case 0:
//complete
steps.get(position).setType(MyListViewItemBean.COMPLETED);
break;
case 1:
//delete
steps.remove(position);
break;
}
myListViewAdapter.notifyDataSetChanged();
return false;
}
这个是我的代码。当我点击删除之后,从steps中删除当前数据,然后当前item确实被删除了,但是下一个item变成了open状态,这是怎么回事?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the onMenuItemClick handler shown in the issue, especially the delete branch and the subsequent myListViewAdapter.notifyDataSetChanged() call. Reproduce deleting a swiped item and inspect how the list handles the removed position; done means the deleted item disappears without the next item opening unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100