@JohnC
I tried out all the suggestions.
1) Webview.Zoom(ZoomIn as Boolean) 'make sure 'zoomenabled = true
It has the same effect as clicking the + / - buttons on Webview
2) WebviewSettings lib has wvs.setDefaultFontSize(wv,FontSize)
Nothing happens !
3) Webviewsettings lib has wvs.SetDefaultZoom(Close, far, medium)
Nothing happens !
This is my code for testing it out.
[CODE lang="b4x" title="B4A"]
Sub btnZoomIn_Click
'WebViewSettings1.setDefaultZoom(WebView1,"CLOSE")
WebViewSettings1.setDefaultFontSize(WebView1,20)
End Sub
Sub btnZoomOut_Click
'WebViewSettings1.setDefaultZoom(WebView1,"FAR")
WebViewSettings1.setDefaultFontSize(WebView1,5)
End Sub
Sub btnMedium_Click
'WebViewSettings1.setDefaultZoom(WebView1,"MEDIUM")
WebViewSettings1.setDefaultFontSize(WebView1,12)
End Sub[/CODE]
After observing that clicking on the buttons does not help, I shifted the code to Activity_Create, before the Webview1.LoadUrl.
[CODE lang="b4x" title="B4A"]Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
'WebView1.Initialize("")
'Activity.AddView(WebView1, 0, 0, -1, -1)
WebView1.ZoomEnabled=True
'WebViewSettings1.setDefaultZoom(WebView1,"CLOSE")
'WebViewSettings1.setDefaultZoom(WebView1,"FAR")
'WebViewSettings1.setDefaultFontSize(WebView1,22)
WebViewSettings1.setDefaultFontSize(WebView1,5)
WebView1.LoadUrl("https://www.b4x.com/android/forum/threads/webviewsettings.12929/")
Activity.AddMenuItem("Zoom In", "ZoomIn")
Activity.AddMenuItem("Zoom Out", "ZoomOut")
End Sub[/CODE]
Ran it in Debug mode (with breakpoints ).
Uncomment a line, SAVE, Back Key and RESUME.
No change in behaviour. No zoom in or out.
Anything wrong in my approach ?
Regards,
KPS