I set FloatingActionButton to bottom of screen and I want to animate the button.
- Hidden when scrolling down
- Shown when scrolling up
Like google implemented it in their Google+ app.
I think CoordinatorLayout and AppBarLayout is needed but how to implement it to use it with the FloatingActionButton?

You can achieve it using the default
FloatingActionButtonchanging its defaultBehaviorusing theapp:layout_behaviorattribute:You can use a layout like:
With the
app:layout_behavioryou can define your ownBehavior. With theonStartNestedScroll()andonNestedScroll()methods you can interact with scroll events.You can use a Behavior like this. You can find the original code here: