Android Question How can call "ventusky.com" without menu items ?

Adamdam

Active Member
Licensed User
Longtime User
Dear All,
I Called "ventusky.com" in Webview in my app, but i have problem: that the menu items ("App", "Share", "Setting", "About") take space and didn't use them.
So, Can I call ventusky.com in Webview without these items ?
Question may be in other way "how can call "embedded ventusky.com" in webview without un-wanted items

Waiting for any help
best regards
 

drgottjr

Expert
Licensed User
Longtime User
you need to include the webviewextras library
add the following sub to your project.
B4X:
Sub webview_PageFinished (Url As String)
    Dim javascript As String = $"var x = document.getElementById("menu-app").parentElement;
    x.style.display = 'none';"$
    wvx.executeJavascript(webview, javascript)
End Sub

initialize and add your webview to the project (as per attached image)
load the url
the menu will automagically be erased.


*note: i called my webview "webview". that is why the PageFinished sub says "webview_PageFinished". if you use a different name, you need to change the sub accordingly.
 

Attachments

  • ventusky.png
    ventusky.png
    144.4 KB · Views: 75
Upvote 0
Top