SpringFabMenu
A menu of FloatingActionButton items, designed to be anchored on an AppBarLayout.
Usage
- Edit your build.gradle to include the library and sync.
dependencies {
implementation 'com.rany.albeg.wein:spring-fab-menu:1.0.1'
}
Or with Maven:
- Create a
SpringFabMenu
in XML:
All available attributes ( following values are defaults ):
app:sfm_collapse_duration
: The time ( in ms ) it takes for the menu to collapse.app:sfm_collapse_on_item_selected
: Will the menu collapse when a menu-item is clicked.app:sfm_delay_expanding_menu_items
: Delay ( in ms ) between expanding menu items.app:sfm_expand_duration
: The time ( in ms ) it takes for the menu to expand.app:sfm_expand_item_rotation_degrees
: Degrees of rotation for expanding menu item.app:sfm_expand_menu_button_rotation_degrees
: Degrees of rotation for the menu button.app:sfm_menu_button_color
: The color of the menu button.app:sfm_menu_button_ripple_color
: The ripple color of the menu button.app:sfm_size_menu_button
: The size of the menu button.app:sfm_spacing_menu_items
: Spacing ( in dp ) between menu items.app:sfm_src_icon
: The icon for the menu button.
Note:
If you decide to anchor SpringFabMenu
to an AppBarLayout
, don't forget to apply a behavior to hide or show the menu:
app:layout_behavior="@string/appbar_springfabmenu_behavior"
- Listen for item clicks: