@@ -0,0 +1,1717 @@
+/*%0A * Copyright (C) 2016, %E7%A8%8B%E5%BA%8F%E4%BA%A6%E9%9D%9E%E7%8C%BF%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage me.yifeiyuan.climb.ui.widget;%0A%0Aimport android.content.Context;%0Aimport android.support.design.widget.CoordinatorLayout;%0Aimport android.support.design.widget.FloatingActionButton;%0Aimport android.support.v4.view.ViewCompat;%0Aimport android.util.AttributeSet;%0Aimport android.view.View;%0A%0A/**%0A * Created by %E7%A8%8B%E5%BA%8F%E4%BA%A6%E9%9D%9E%E7%8C%BF on 16/7/28.%0A *%0A * %E6%BB%91%E5%8A%A8%E6%97%B6%EF%BC%8C%E6%8E%A7%E5%88%B6FAB %E7%9A%84%E6%98%BE%E7%A4%BA%E9%9A%90%E8%97%8F%0A *%0A */%0Apublic class FabBehavior extends FloatingActionButton.Behavior %7B%0A%0A    private static final String TAG = %22FabBehavior%22;%0A%0A    public FabBehavior(Context context, AttributeSet attrs) %7B%0A        super();%0A    %7D%0A%0A    @Override%0A    public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) %7B%0A        return ViewCompat.SCROLL_AXIS_VERTICAL == nestedScrollAxes;%0A    %7D%0A%0A    @Override%0A    public void onNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) %7B%0A        if (dyConsumed %3E 0) %7B%0A            child.hide();%0A        %7Delse%7B%0A            child.show();%0A        %7D%0A%0A    %7D%0A%7D%0A

add fabbehavior