Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/179.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 我该如何修复Swipper布局不稳定?_Java_Android_Android Support Library_Swiperefreshlayout - Fatal编程技术网

Java 我该如何修复Swipper布局不稳定?

Java 我该如何修复Swipper布局不稳定?,java,android,android-support-library,swiperefreshlayout,Java,Android,Android Support Library,Swiperefreshlayout,SwipeRefreshLayout已添加到v19.1.0中的Android支持库中: 我现在已经将它添加到我的应用程序中,它的工作方式与广告中的一样。然而,如果我慢慢地刷卡,我会注意到超卷是非常不稳定的。请看此视频了解我的意思: 我使用不同复杂程度的多个布局来解决这个问题。上面链接的视频中显示的布局为: <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com

SwipeRefreshLayout已添加到v19.1.0中的Android支持库中:

我现在已经将它添加到我的应用程序中,它的工作方式与广告中的一样。然而,如果我慢慢地刷卡,我会注意到超卷是非常不稳定的。请看此视频了解我的意思:

我使用不同复杂程度的多个布局来解决这个问题。上面链接的视频中显示的布局为:

<android.support.v4.widget.SwipeRefreshLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/swipe_refresh_widget"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ListView
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
Github上的完整源代码:


有人对如何纠正这种急动有什么建议吗?过卷应该是平滑的,无论我花多长时间过卷所需的距离。谢谢

这在支持库v4的20.0版本中已修复。 如果您正在使用gradle:

compile 'com.android.support:support-v4:20.0'
compile 'com.android.support:support-v4:20.0'