ScrollView中没有释放动力

Pol*_*nom 10 android scrollview

在我的活动中,我有两个RecyclerViews ScrollView.问题是当我轻扫/轻弹时ScrollView,滚动立即停止.是否有办法ScrollView实现动量或惯性,所以在滚动停止之前有一些减速?

我的XML如下:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<ProgressBar
    android:id="@+id/threadload_progress"
    style="?android:attr/progressBarStyleLarge"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="8dp"
    android:visibility="gone" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/subforums"
        android:name="net.polunom.forum.fragments.ThreadFragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layoutManager="LinearLayoutManager"
        tools:context=".fragments.ThreadFragment"
        tools:listitem="@layout/fragment_subforum"/>

    <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/threadlist"
        android:name="net.polunom.forum.fragments.ThreadFragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layoutManager="LinearLayoutManager"
        tools:context=".fragments.ThreadFragment"
        tools:listitem="@layout/fragment_thread"/>

</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)

Pol*_*nom 15

我想到了!我所要做的只是设置setNestedScrollingEnabled(false);为两个RecyclerView,一切都像魅力一样开始.