hide/show fab with scale animation

后端 未结 3 1818
眼角桃花
眼角桃花 2021-02-02 11:14

I\'m using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here floating action button behaviour

Is there any way to do this

3条回答
  •  太阳男子
    2021-02-02 11:51

    The design support library revision 22.2.1 added the hide() and show() methods to the FloatingActionButton class, so you can use these from now on.

    FloatingActionButton mFab;
    mFab.hide();
    mFab.show();
    

    You can apply your own animation on it. For more info check this.
    And for more information about FAB, check the official documentation.

提交回复
热议问题