rjsvieira / floatingMenu

An orbit-like action button
Apache License 2.0
305 stars 42 forks source link

[Adress issue #10] Added an option to limit the button's movements to the sides of the screen #11

Closed jdamacena closed 6 years ago

jdamacena commented 6 years ago

Hello, I was in need of a way to limit the places where the button could be placed, I wanted it to "stick" to the sides of the screen, so that the subbuttons would show in a nice way. Unfortunately, there wasn't any, then, I created one. I also added an option that make the button get transparent after some time, useful in my app. And here is the result, I hope it helps somebody else 😄 Edit: I also replaced the anchored, by an enumerator called movementStyle that allows to select among stick to sides, anchored or free (wich is equivalent to anchored = false).

rjsvieira commented 6 years ago

Hello Junior, Only now have I been able to pay some attention to the request. The 'setAnchored' method was the closest to what you were asking, but it seems your code change aims to improve this behaviour. I will analyse and test and should it be indeed better, I will accept the PR. Thank you for your contribution and feedback, though :) Regards,

rjsvieira commented 6 years ago

Tested and fit for merge. Thanks @jdamacena for his contribution "Mandou bem :)"