I have a webview and I have the following code:
webview.setInitialScale(75);
I also disabled scaling:
webview.getSettings().setSupportZoom(false);
Both of these code fragments work very well, until a text block (input field) is selected in WebView, then the application is scaled to 100%.
I am trying to understand how to intercept and stop the scale when a text field is selected, however, I was not lucky with the following:
onCheckIsTextEditor() - This is not like clicking a text field
I can zoom to 75% after scaling the page by overriding the method onScaleChanged()in the WebViewClient class. However, this can only be done by executing a loop zoomOut()until the correct scale is completed.
It seems to me that there should be a place where a click actually triggers an event to focus the text field and redraw the view to scale it (and is called onScaleChanged()), I just could not find it.
Any help would be greatly appreciated.
source
share