android - How to disable Clicking of WebView? -
i have linear layout contains webview. want disable click in webview, means want event called associated relativelayout bg_stepscontainer. i've used android:clickable="false" here code
<relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minheight="30dp" android:layout_marginleft="5dp" android:layout_marginright="5dp" android:layout_margintop="5dp" android:layout_marginbottom="5dp" android:id="@+id/bg_stepscontainer" > <linearlayout android:id="@+id/stepslcontainer" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:clickable="false" android:focusable="false" android:focusableintouchmode="false" > <webview android:id="@+id/bg_stepstoreproduce" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false" android:focusable="false" android:focusableintouchmode="false" android:textcolor="@color/solid_black" /> </linearlayout> <imageview android:id="@+id/stepsarrow" android:layout_width="10dp" android:layout_height="10dp" android:layout_alignparentright="true" android:clickable="false" android:layout_marginright="10dp" android:layout_marginleft="10dp" android:layout_centervertical="true" android:src="@drawable/ic_right_arrow" /> </relativelayout>
any suggestions appreciated!
mwebview.setontouchlistener(new view.ontouchlistener() { @override public boolean ontouch(view v, motionevent event) { return true; } });
using android:clickable="false" not disable touch events.
Comments
Post a Comment