I have a Webview in an Android App. Any type of content(pdf,png,doc) will be loaded in the Webview. I need to disable the input controls (checkbox, inputbox) in the Webview content. And If we use onTouchListener, the zooming controls should not work. Do anyone help me out on this please?
Asked
Active
Viewed 1,040 times
1 Answers
0
Try this may it will help you
myWebview.clearFocus()
myWebview.getSettings().setBuiltInZoomControls(false);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
// Use the API 11+ calls to disable the controls
// Use a seperate class to obtain 1.6 compatibility
new Runnable() {
public void run() {
myWebview.getSettings().setDisplayZoomControls(false);
}
}.run();
}
myWebView.setOnTouchListener(null)
myWebview.setClickable(false)
myWebView.setEnabled(false)
Add the following property to webview inside your layout.xml file
android:clickable="false"
android:longClickable="false"

Nilesh Panchal
- 1,059
- 1
- 10
- 24
-
Thanks @Nilesh. I will check and let you know. – DayanaK Sep 22 '18 at 09:41
-
hello @DayanaK have you got the solution? – Nilesh Panchal Sep 24 '18 at 04:25
-
hello @DayanaK update your webview in xml file as i have now update the answer please check updated answer and applied it and tell me it is worked or not? – Nilesh Panchal Sep 24 '18 at 07:14