I'm using FloatingActionsButton (FAB) from the design support library (com.android.support:design:22.2.0).
In my application I have two main functionalities which the first is to sync data every X minutes (which starts a service and updates the data every X minutes) and the second is sync once (which request data from the server and updates the UI).
I want to use FAB for these main functionalities and wondering what and how I can make it:
The first approach is using one FAB that when is clicked the button will show two new FABs one for each functionality.
The second approach is displaying always two FABs in the UI which the sync every X minutes FAB will be bigger than the update once FAB.
I interesting in the first approach and wondering how can I implement this behaviour? I looked around but this view is new and I couldn't find an example.
Thanks.
I am using this github library, it is very simple and solved my problems:
https://github.com/Clans/FloatingActionButton
Add a dependency to your build.gradle:
Add this to the beginning of your xml:
Now just add your buttons, example: