Create a floating action button with an animated sub menu

I am creating an application in which I am creating a new floating action button with several helper actions related to FAB.

I tried this library . It works fine, but that’s not quite what I want.

I want to add it on tabs with each tab having different FABs with submenus. The problem with the above FAB library is not removed after changing the tab. It still appears on other tabs, even if I add it to only one tab (each tab is a fragment).

And I also want to use a similar FAB used by Evernote with a similar kind of animation. Does anyone know of any third-party library or is there any API available in the new Android SDK.

Thank you in advance!...

+5
source share
2 answers

Try putting the FAB in the XML layout of only the fragment, not the parent activity. This should ensure that it displays only the fragment (tab), and not everywhere.

+1
source

I have a similar problem with this FAB library.

For your first question, you can try this, YourFABObject.setVisibility (View.INVISIBLE), when you switch to another tab, this works for me.

For your second question, if you mean vertical extended FAB, I use this one: https://github.com/futuresimple/android-floating-action-button

0
source

Source: https://habr.com/ru/post/1205840/


All Articles