Is there a library for Floating Action Buttons (FA

2019-01-31 02:00发布

问题:

Is there a library for creating Floating Action Buttons with labels (similar to the Evernote app)?

Evernote Screenshot

The popular libraries seem to be

  • https://github.com/futuresimple/android-floating-action-button (closest to what I want... ability to expand hide "sub" actions)
  • https://github.com/makovkastar/FloatingActionButton (Primary function is to hide/show with a scrollview, recyclerview, or listview)
  • https://github.com/oguzbilgener/CircularFloatingActionMenu (library which has been around pre-lollipop)

Neither of these, to my knowledge, have this capability. Before re-inventing the wheel, has somebody already done this?

回答1:

This feature request ended up being implemented in https://github.com/futuresimple/android-floating-action-button. This includes labels on both the left and right sides.

If you're interested, see the discussion here: https://github.com/futuresimple/android-floating-action-button/issues/22#issuecomment-66155108

Disclaimer: I haven't used this (yet).

I'd recommend this library over others that I've seen.



回答2:

Nowadays there are available techniques of manipulating behaviour of the view that enable you to program FloatinActionButton as you want and to have joy that you have made it by yourself!

  1. Fade in/out FloatingActionButton while scrolling RecyclerView . DETAILS

  2. Slide down/up , beside it blog says how to:

  3. Expand floatingActionButton and show subFloatingButtons. DETAILS HERE

There is to much details, "how to do". Therefore I've attached just links to blogs. Anyway I encourage you guys to take a look at those blogs. You will have total control over your application. Currenty I use all solutions from both blog's. Enjoy!



回答3:

Especially the last library you mentioned looks quite sophisticated. To my knowledge, you can set any kind of View you want to be shown as a Button.

This View could simply be a custom-view of yours that shows an image as well as a label.