我有:
现在我有一个滚动视图作为父项。在这个滚动视图中,我使用一个WebView加载一个URL,然后在其中显示文本。 这里是我的xml:在滚动视图中滚动Webview
<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时,不幸的是父滚动视图被调用。 我必须保持父滚动视图,但除此之外,当我触摸webView时,我想滚动其中的WebView内容。
我该怎么做?
@CaseyB ...但它我的要求。 。我必须保持webView在滚动视图。你对这个有什么想法吗? – Noman
那么恐怕你的要求是错误的,你应该永远不需要这样做。 –
@JosephEarl ..好吧,然后我尝试改变设计。它对我来说很难.. – Noman