【发布时间】:2010-07-10 10:31:07
【问题描述】:
我正在尝试像列表视图滑动一样从左到右滑动 Web 视图。我已经按照显示here 的方式进行了操作。
我还在viewflipper 中设置了webviews
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flipper" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview1" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview2" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
但我认为 webView 的 onTouchEvent 在这里不起作用。
@Override
public boolean onTouchEvent(MotionEvent event) {
if (gestureDetector.onTouchEvent(event))
return true;
else
return false;
}
【问题讨论】:
标签: android webview android-webview