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

a6000000

Member
Licensed User
Longtime 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
Longtime 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:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
It's a built-in lib - just look in the right lDE library tab for "Reflection 2.40"
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
You can also use WebViewSettings:
B4X:
webviewsettings.setDisplayZoomControls(webview1,False)
 
Upvote 0

JohnC

Expert
Licensed User
Longtime 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.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…