Arun Jose
Arun Jose

Reputation: 1857

How to restrict user from entering value in webview, Android?

How to restrict user from entering value in the webView, in android.

In my android application i have a webView which shows some textareas, checkboxes, radiobuttons etc... This app has a read only mode in which the user can see only the contents he entered earlier in the webView.

But how to restrict user from re-entering values??

Upvotes: 0

Views: 1233

Answers (1)

Ricardo
Ricardo

Reputation: 7965

You can set your WebView to not be clickable in your layout xml:

android:clickable="false"
android:longClickable="false"

You can also try to remove the focus from it:

myWebView.setEnabled(false); 

and/or

myWebView.setOnTouchListener(null);

Upvotes: 1

Related Questions