我的现有情况:
目前我有一个滚动视图作为父视图。在这个滚动视图里,我使用一个WebView加载URL,然后显示其中的文本。
以下是我的xml:
<ScrollView
android:id="@+id/parentScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/Heading" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="@drawable/webview" />
</RelativeLayout>
</ScrollView>
我想要在webView内部滚动。当我点击webView时,可能会触发父级scrollView的滚动。我需要保留Parent scrollView,但是希望在点击webView时也能够在其中滚动webView内容。
我该如何实现这个功能?