I found the way to enable/disable zoom controls in Android WebView from following question.
How to remove zoom buttons on Android webview?
I'm using NativeScript and I don't see similar method in NativeScript WebView. Is there any way I can access the methods of Android WebView from NativeScript? Or, is there any other way?
Thanks.
It uses WebView for rendering. NativeScript is the open source framework to build truly native mobile apps with Angular, Typescript and Javascript. It directly communicates with Native APIs so we can access it via JS. Unlike Cordova, it doesn't use a WebView-based wrapper.
You can get hold of the actual android trough the android
property of your WebView. So you can probably use something like that in the loaded event:
var webView = page.getViewById("webViewID");
if(webView.android) { // in IOS android will be undefined
webView.android.getSettings().setBuiltInZoomControls(false);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With