Setting behaviour of FloatingActionButton

suggest change

You can set the behavior of the FAB in XML.

For example:

<android.support.design.widget.FloatingActionButton    
   app:layout_behavior=".MyBehavior" />

Or you can set it programmatically. fab is the FloatingActionButton, and its parent must be a CoordinatorLayout for this cast. MyBehavior is not defined in this snippet.

CoordinatorLayout.LayoutParams p = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
p.setBehavior(new MyBehavior());
fab.setLayoutParams(p);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents