Android Question [B4A] WebView how to hide Zoom Controls (+) (-) buttons ? setDisplayZoomControls(false)

a6000000

Member
Licensed User
in AndroidStudio in WebView, I hide the (+) (-) Zoom Controls UI buttons with :


WebView setDisplayZoomControls(false):
      // in AndroidStudio onCreate() :
      private WebView webView;
      // ..


       // hide +- buttons
       webView.getSettings().setDisplayZoomControls(false);

How to hide it in B4A ?
 
Last edited:

a6000000

Member
Licensed User
i found in forum

B4X:
   '// in:  Sub Globals : // Dim r As Reflector //

    r.Target = WebView1
    r.Target = r.RunMethod("getSettings")
    r.RunMethod2("setBuiltInZoomControls", True, "java.lang.boolean")
    r.RunMethod2("setDisplayZoomControls", False, "java.lang.boolean")
but in witch Lib is Reflector

I search forum " Lib with Reflector " but no happy

ok now with

https://www.b4x.com/android/forum/threads/reflection-library.6767/

Reflection Lib Reflection2.4.zip
 
Last edited:

JohnC

Well-Known Member
Licensed User
It's a built-in lib - just look in the right lDE library tab for "Reflection 2.40"
 

JohnC

Well-Known Member
Licensed User
You can also use WebViewSettings:
B4X:
webviewsettings.setDisplayZoomControls(webview1,False)
 

JohnC

Well-Known Member
Licensed User
Also, to get the best compatibility out of webview, you should add the chromeclient to it as mentioned below in tip #1 of my post signature.
 
Top