TorryDo / Floating-Bubble-View

πŸ€an Android library that adds floating views on top of your screen🎨, supports both XML and Jetpack Compose
Apache License 2.0
204 stars 34 forks source link

Bubble touch not working properly #40

Closed Maeil456 closed 7 months ago

Maeil456 commented 1 year ago

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

TorryDo commented 1 year ago

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

https://github.com/TorryDo/Floating-Bubble-View/assets/85553681/6f7c7446-8576-48cb-9189-ad0922e1abd2

Maeil456 commented 1 year ago

My problem similar with that video!

and also attach my video! Thx :-)

https://youtube.com/shorts/H-hoF8svoTg?si=Y5wMUj2mBbIdtEk2

2023λ…„ 9μ›” 1일 (금) μ˜€ν›„ 5:26, Tri Do @.***>λ‹˜μ΄ μž‘μ„±:

hi @Maeil456 https://github.com/Maeil456, πŸ‘‹

Are you experiencing the problem similar to the one shown in the video below? (sometimes it work corrrectly, sometime 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

https://github.com/TorryDo/Floating-Bubble-View/assets/85553681/6f7c7446-8576-48cb-9189-ad0922e1abd2

β€” Reply to this email directly, view it on GitHub https://github.com/TorryDo/Floating-Bubble-View/issues/40#issuecomment-1702367317, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBUZ6SFQVVOK4JA7CKE4N4TXYGL2VANCNFSM6AAAAAA4HEIM7U . You are receiving this because you were mentioned.Message ID: @.***>

Kumpello commented 1 year ago

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

TorryDo commented 1 year ago

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

Kumpello commented 1 year ago

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

TorryDo commented 1 year ago

@Kumpello πŸ‘‹ when you drag the bubble, the .onCLick/.clickable won't be ignore without ignoreChildEvent

https://github.com/TorryDo/Floating-Bubble-View/assets/85553681/b005a716-8d0f-4426-97b9-b25aea05db11

Kumpello commented 1 year ago

@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

TorryDo commented 1 year ago

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.

Boguslawa-Tlolka commented 9 months ago

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?

TorryDo commented 9 months ago

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.

Boguslawa-Tlolka commented 9 months ago

https://github.com/TorryDo/Floating-Bubble-View/assets/79993467/51093257-8677-4739-b0cc-5b96e332399e

TorryDo commented 8 months ago

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 πŸ€”

Boguslawa-Tlolka commented 8 months ago

@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

https://github.com/TorryDo/Floating-Bubble-View/assets/79993467/3ae4cfc6-faf1-4067-b015-690ab37b2e74

TorryDo commented 8 months ago

@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.

Boguslawa-Tlolka commented 8 months ago

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

TorryDo commented 8 months ago

@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

Boguslawa-Tlolka commented 8 months ago

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

TorryDo commented 8 months ago

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

Boguslawa-Tlolka commented 7 months ago

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

TorryDo commented 7 months ago

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