CymChad / CymChad/BaseRecyclerViewAdapterHelper
版本:3.0.14,调用item点击事件后notifyDataSetChanged,item的拖拽事件就不灵敏了,必现
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
mAdapter.itemAdapterClick = { parentPos, adapter, childPos ->
ToastUtils.showShort("点击了")
mAdapter.notifyDataSetChanged()
}
itemAdapter.draggableModule.isDragEnabled = true
itemAdapter.setOnItemClickListener { adapter, view, position ->
if (::itemAdapterClick.isInitialized) {
itemAdapterClick.invoke(layoutPosition, itemAdapter, position)
}
}
使用版本3.0.14,过程是:正常情况下拖拽是没有问题的,当点击item后,再长按拖拽事件,拖拽事件就会失效,感觉是冲突的样子
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sequence described in the issue with version 3.0.14: enable item dragging, click an item, call notifyDataSetChanged, then long-press to drag. Trace the item click and draggableModule interaction; done means dragging remains responsive after the notification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100