I have made an app in which there is a transparent image on the webview.
My webview has zoom functionality enabled, but after I put transparent image in a transparent LinearLayout
on the Webview
, I cannot get zoom enabled. Perhaps the transparent LinearLayout
(containing partial transparent image) on the Webview
restricts the touch event to be detected on Webview
.
So how do I solve this ?
My application screenshot looks like the image given below.
webview.xml file:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
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" />
</RelativeLayout>
search_image.xml file:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/menu_search"/>
</LinearLayout>