Android webView 滚动问题

Android webView scroll issue

我尝试使 webView 高度 wrap_content 并用于滚动外部滚动视图。但在我的例子中,只滚动 webView 和其他放置在下面的视图,没有显示。我需要在 webView 下方显示复选框和按钮。这是我的布局。可能有一些方法可以禁用 webView 内的滚动?有没有人尝试做这样的事情?

 <ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="8dp"
        android:orientation="vertical"
        android:paddingEnd="8dp"
        android:paddingStart="8dp">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:gravity="center"
            android:text="@string/signup_title_complete_registration"
            android:textColor="?android:textColorPrimary"
            android:textSize="24sp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:ellipsize="end"
            android:gravity="center"
            android:text="@string/signup_subtitle_complete_registration"
            android:textColor="?android:textColorPrimary"
            android:textSize="14sp" />

        <WebView
            android:id="@+id/disclosureWv"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="visible" />

        <CheckBox
            android:id="@+id/chekBox"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="32dp"
            android:background="?selectableItemBackground"
            android:button="@null"
            android:checked="@={viewModel.agree}"
            android:drawableEnd="?android:listChoiceIndicatorMultiple"
            android:ellipsize="end"
            android:gravity="start|center"
            android:maxLines="4"
            android:paddingBottom="10dp"
            android:paddingTop="10dp"
            android:text="@string/signup_title_agreement_checkbox"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp"
            android:textStyle="bold" />

        <LinearLayout
            android:id="@+id/buttonContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="8dp">

            <Button
                android:id="@+id/previousBtn"
                style="@style/Button.White.BlueStroke"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_weight="1"
                android:onClick="@{() -> viewModel.onPreviousClicked()}"
                android:text="@string/general_button_previous_step"
                android:textColor="?android:textColorTertiaryInverse"
                android:textSize="16sp" />

            <Button
                android:id="@+id/nextBtn"
                style="@style/Button.Positive"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_weight="1"
                android:enabled="@{viewModel.enabled}"
                android:onClick="@{() -> viewModel.onNextClicked()}"
                android:text="@string/general_button_next"
                android:textSize="16sp" />

        </LinearLayout>
    </LinearLayout>
</ScrollView>

我怎样才能达到这种行为?

仅在模拟器上修剪了 WebView 内容。当我在真实设备上构建应用程序时,一切都变得很好