Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setInitiateOnLongPress no longer works on Android 12 #516

Open
kmspop opened this issue Feb 11, 2022 · 0 comments
Open

setInitiateOnLongPress no longer works on Android 12 #516

kmspop opened this issue Feb 11, 2022 · 0 comments

Comments

@kmspop
Copy link

kmspop commented Feb 11, 2022

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

        dragDropManager.setInitiateOnLongPress(true)
        dragDropManager.setInitiateOnMove(false)
        dragDropManager.setLongPressTimeout(750)

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.

asuka-mio added a commit to Ehviewer-Overhauled/Ehviewer that referenced this issue Aug 5, 2022
* Actually this library is unmaintained for above a year, and drag feature we used is totally broken on Android 12 and above h6ah4i/android-advancedrecyclerview#516 #54
ChaoCaiGuo pushed a commit to ChaoCaiGuo/Ehviewer that referenced this issue Aug 28, 2022
* Actually this library is unmaintained for above a year, and drag feature we used is totally broken on Android 12 and above h6ah4i/android-advancedrecyclerview#516 Ehviewer-Overhauled#54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant