TorryDo / Floating-Bubble-View

🍀an Android library that adds floating views on top of your screen🎨, supports both XML and Jetpack Compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bubble touch not working properly

Maeil456 opened this issue · comments

Steps to reproduce

I created a bubble using your ViewHelper, but when I touched it to expand it,There's only closebubble and it didn't expand.

Expected behavior

The bubble should expand when touched.

Actual behavior

Touching the bubble didn't expand it.
With the bubble touching the edge, press the bubble toward the edge to operate.

Crash logs

No response

Floating-Bubble-View version

0.5.6

Android version

android13

Device

Galaxy 22+

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

hi @Maeil456, 👋

Are you experiencing the problem similar to the one shown in the video below? (sometimes it works corrrectly, sometimes not).
I've noticed this issue occuriring on some devices, and I'll try to fix it ASAP.

Thank you 💖


Android version

Android 10

Device

Huawei matepad 10.4

matepad-touch-issue.mp4

Hardcoding forceDragging to false in FloatingBubble.kt solves this issue, it seems that setOnTouchListener must be used
To fix this you just need to set forceDragging in builder to false

Thank you @Kumpello 💖

Yes, set bubble forceDragging to false does fix this issue. However, it also reduce/ignore draggable area if the view/compose uses .setOnClickListener{...}/ clickable{...}. For example If you use use .setOnClickListener/clickable for the entire view like in the image below, you won't be able to drag it.

image

I'll try to fix it ASAP. Thanks

I changed onClickListener to doOnTouchEvent function but without ignoreChildEvent, it seems to fix it. What for ignoreChildEvent is needed anyway?

@Kumpello 👋 when you drag the bubble, the .onCLick/.clickable won't be ignore without ignoreChildEvent

ignore_child_ev.mp4

@Kumpello 👋 when you drag the bubble, the .onCLick/.clickable won't be ignore without ignoreChildEvent
ignore_child_ev.mp4

Thank's for answer, i worked out solution in new commit

Hi @Maeil456 👋,

This bug has been fixed in v0.6.3, thanks to the help of @Kumpello.

If you have any problems, don't hesitate to re-open the issue.

Thank you.

Hi @TorryDo,

I still have this problem on my Samsung Galaxy S8 device with Android 9.

I tried using 0.6.3 and 0.6.4 version of your library, but it's still not working. I also downloaded zip file with 0.6.3 and tried the sample app - it has the same issue.

But then I manually added the fix from @Kumpello pull request and it's working fine.

Can you please verify your solution to this issue?

Hi @Boguslawa-Tlolka, I've tested on my devices (android 9 (avd), 10, 12. Both phone and tablet) and they run fine. Can you provides some videos about your cases?
Thanks.

Screen.Recording.2024-01-30.at.15.03.12.mov

Hey @Boguslawa-Tlolka 👋, can you try this branch on your device and share your feedback? I've test on a custom emulator (similar specs to Samsung Galaxy S8, Android 9) and the issue did not happen, really weird 🤔

@TorryDo I think that it's better than it was, but it still has this issue
I also think that on emulator the click is too precise, so this problem doesn't happen there

Screen.Recording.2024-02-28.at.12.23.08.mov

@Boguslawa-Tlolka Did you move your finger a little after you touched the bubble? because if the bubble is moved then it's correct behavior. Anyway I think I'll provide an API to fix this issue. thanks.

@TorryDo I tried not to move my finger after touching bubble and it works fine

@Boguslawa-Tlolka Great! So, does keeping your finger still when clicking the bubble fix the problem in the first video you sent?. I mean, if you can click the bubble easily, then there's no need to fix this issue

@TorryDo sorry for such a late response, but without this fix it's not working correct in my case, so it's still needed

@Boguslawa-Tlolka Can you try this branch and share your feedback again? seems like the issue is gone now

@TorryDo I tried this branch and it's working fine

This issue has been resolved in v0.6.5. If you guys have any problems, don't hesitate to re-open the issue. Thanks ❤️