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
4 stars 0 forks source link

fix: floating view "detaches" pointer when reaching screen limits #78

Closed luiisca closed 3 weeks ago

luiisca commented 3 weeks ago

b/c it stops updating crrPoint on each drag creating a greater distance between pointer and element, on drag up crrPoint will finally update but with a value that creates a feeling of disconnect that can cause a bad user experience

linear[bot] commented 3 weeks ago

GIT-438 fix: floating view "detaches" pointer when reaching screen limits

luiisca commented 3 weeks ago

there is another more subtle contributor to this issue, dragAmount.x.toInt(). This toInt() truncates Floats into jsut their natural part, so 0.5f becomes 0, causing this small drags at the bottom to be rounded to 0, thus not moving the elmet at all