Within an adapter on onBindViewHolder, I have a view that removes an item from the list.
e.g.
override fun onBindViewHolder(holder: MemberViewHolder, position: Int) {
...
binding.removeBtn.setOnClickListener {
circle.removeMember(memberWrapper.member.userId)
notifyDataSetChanged()
memberRemovalListener.onMemberRemoved(memberWrapper.member)
}
...
}
The click listener set on binding.removeBtn responses to the tap of this view on Android 11 and below.
However, on Android 12, the click event no longer gets fired.
And it might be related to drag touch event not getting propagating down to click events.
On Android 12, setInitiateOnLongPress = true is ignored and drag and drop gets initiated by just a tap.
Also another issue that might have been caused by probably the same root issue is
I have the drag and drop manager setup as
Within an adapter on onBindViewHolder, I have a view that removes an item from the list. e.g. override fun onBindViewHolder(holder: MemberViewHolder, position: Int) { ... binding.removeBtn.setOnClickListener { circle.removeMember(memberWrapper.member.userId) notifyDataSetChanged() memberRemovalListener.onMemberRemoved(memberWrapper.member) } ... }
The click listener set on binding.removeBtn responses to the tap of this view on Android 11 and below. However, on Android 12, the click event no longer gets fired. And it might be related to drag touch event not getting propagating down to click events.