Android如何让recyclerview Overcroll反弹在拉过限制时产生影响?

Android如何让recyclerview Overcroll反弹在拉过限制时产生影响?,android,android-layout,swiperefreshlayout,Android,Android Layout,Swiperefreshlayout,我正在寻找一种方法,使我的recycleView在顶部拉时有弹性。让我给你看一张我想要的图片: 因此,你可以从gif中看到,当用户下拉列表顶部时,它有一种弹性反弹的效果。我如何做到这一点?我想要这种效果,这样我的swipeRefreshLayout就不会因为到达顶部而轻易触发。我希望他们能真正地振作起来,而不仅仅是达到顶峰。我的appbar布局现在如下所示: <?xml version="1.0" encoding="utf-8"?> <android.suppor

我正在寻找一种方法,使我的recycleView在顶部拉时有弹性。让我给你看一张我想要的图片:

因此,你可以从gif中看到,当用户下拉列表顶部时,它有一种弹性反弹的效果。我如何做到这一点?我想要这种效果,这样我的swipeRefreshLayout就不会因为到达顶部而轻易触发。我希望他们能真正地振作起来,而不仅仅是达到顶峰。我的appbar布局现在如下所示:

    <?xml version="1.0" encoding="utf-8"?>

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_content"
    android:layout_width="match_parent"
    android:fitsSystemWindows="false"
    android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/id_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/white">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="@color/white"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:titleEnabled="false">

            <com.mobile..UI.customViews.CategoryBanner
                android:id="@+id/shortcutbanner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_collapseMode="parallax" />

            <include layout="@layout/toolbar" />


        </android.support.design.widget.CollapsingToolbarLayout>

        <android.support.design.widget.TabLayout
            android:id="@+id/tabLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabGravity="fill"
            app:tabMode="fixed"
            android:elevation="6dp"
            app:tabSelectedTextColor="@android:color/darker_gray"
            app:tabTextColor="@color/black" />

    </android.support.design.widget.AppBarLayout>


    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="fill_vertical"
            android:orientation="vertical">



            <com.mobile.UI.customViews.HomePageViewPager
                android:id="@+id/pager"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="fill_vertical"
                />


        </LinearLayout>
    </FrameLayout>
</android.support.design.widget.CoordinatorLayout>

尝试最新gradle 3.0版本中的spring动画。看看sameDid的IO视频,你完全明白了吗?我放弃了。我想我确实看到了一个第三方图书馆。
    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">


    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipefeedRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <com.mobile.UI.customViews.VelocityControlRecyclerView
        android:id="@+id/recyclerView"
        android:layout_marginTop="0dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    </android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
mRecyclerView.setOverScrollMode(View.OVER_SCROLL_ALWAYS);