Search code examples
androiddragfloating-action-button

How to Rotate a Floating Action Button via user Drag


My current Android application has a Floating Action Button

I want to allow the User to rotate the sub menu items of the FAB by dragging one of the sub menu items either clockwise or anti clockwise.

I can use an animation to achieve the rotation effect, however I need the User to control the rotation.

Am I going to have to develop a customised FAB to obtain the desired functionality

or

can I capture the user dragging around the expanded FAB?


Solution

  • Use some wheel menu libraries and place where you need by calculating margin left,right,top and bottom. Refer - https://github.com/szugyi/Android-CircleMenu Happy coding...