luiisca / floating-views

Kotlin library for effortlessly creating customizable floating UI elements in Android apps.
https://central.sonatype.com/artifact/io.github.luiisca/floating.views
MIT License
8 stars 1 forks source link

feat: add remove specific composable by dragging to close bubble view #42

Closed luiisca closed 4 months ago

luiisca commented 5 months ago

edit library code to trigger some event that will remove FloatView from windowManager when is dragged close enough to close view

linear[bot] commented 5 months ago

GIT-411 feat: add remove specific composable by dragging to close bubble view

luiisca commented 4 months ago
close.gif
luiisca commented 4 months ago

got distracted trying to figure out how to receive updates in MainFloaty from CloseFloaty composable after added with windowManager.addView in case it's content changed and MainFloaty needed to update the closable area or something, but realized it was taking too long, and is not even that neccesary

luiisca commented 4 months ago

figured out how to detect when a floaty is in the closable area. used claude 3.5 sonnet for coming up with the idea of usig the distance between two points formula

image.png
luiisca commented 4 months ago

took way too long

remove.gif