我制作了一个应用程序,其中webview上有一个透明的图像.
我的webview启用了缩放功能,但是在将透明图像放在Webview上的透明LinearLayout中之后,我无法启用缩放功能.也许Webview上的透明LinearLayout(包含部分透明图像)限制在Webview上检测触摸事件.
那么我该如何解决这个问题呢?
我的应用程序截图看起来像下面给出的图像.
webview.xml文件: –
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/WebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_weight="1"
android:gravity="bottom|center" />
search_image.xml文件: –
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:orientation="vertical"
android:id="@+id/overlayLayout"
android:weightSum="1">
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/menu_search"/>