Android Question How to force WebView to skip images?

GERSON PINTO

Member
Licensed User
Hello guys!
I am using the webviewExtras2 library and b4A 9.02

B4X:
WebView1.GetSettings.GetLoadsImagesAutomatically=False
cause compile error (attached)

I found in stackoverflow this code:

B4X:
webView.getSettings().setLoadsImagesAutomatically(false);

What is wrong with my code? Any help?
 

Attachments

  • error.PNG
    error.PNG
    15.3 KB · Views: 224

ronell

Well-Known Member
Licensed User
Longtime User
EDIT:

B4X:
log(webviewextras1.GetSettings.GetLoadsImagesAutomatically)

i guess you dont need to set a flag using this code, it just return the settings value ( true or false )

if you want to change the settings then you can use this

B4X:
webviewextras1.GetSettings.SetLoadsImagesAutomatically(False)
 
Last edited:
Upvote 0

GERSON PINTO

Member
Licensed User
EDIT:

B4X:
log(webviewextras1.GetSettings.GetLoadsImagesAutomatically)

i guess you dont need to set a flag using this code, it just return the settings value ( true or false )

if you want to change the settings then you can use this

B4X:
webviewextras1.GetSettings.SetLoadsImagesAutomatically(False)

works! Thank you
 
Upvote 0
Top