@Override
    public void onScrollStateChanged(AbsListView absListView, int scrollState) {
        switch (scrollState) {
            case AbsListView.SCROLL_AXIS_NONE:
                floatHiding = false;
                floatShowing = false;
                ViewPropertyAnimator.animate(view).translationY(0).setDuration(300);
                break;
        }
        if (onScrollListener != null)
            onScrollListener.onScrollStateChanged(absListView, scrollState);
    }
Created by hamedpc on 4/25/2015.
This widget uses NineOldAndroid to animate the view so you're gonna need to include it in your project
MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/AutoHideButtonFloat.java