C csjoe72 Member Licensed User Longtime User Jun 10, 2023 #1 I use b4x pages. How can I load the desired website into the webview running in the background? It loads, but only when the page is appeared, so I have to wait for the content. (I dont't want to wait) Thanks. B4X: Copy Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("Basepanel") X_Weather.Initialize B4XPages.AddPageAndCreate("B4X_Weather", X_Weather) X_Weather.WebView2.LoadUrl("https://www.idokep.hu/elorejelzes/Budapest") End Sub B4X: Copy Sub Class_Globals Private Root As B4XView Public WebView2 As WebView End Sub Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("Weather") End Sub Last edited: Jun 10, 2023
I use b4x pages. How can I load the desired website into the webview running in the background? It loads, but only when the page is appeared, so I have to wait for the content. (I dont't want to wait) Thanks. B4X: Copy Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("Basepanel") X_Weather.Initialize B4XPages.AddPageAndCreate("B4X_Weather", X_Weather) X_Weather.WebView2.LoadUrl("https://www.idokep.hu/elorejelzes/Budapest") End Sub B4X: Copy Sub Class_Globals Private Root As B4XView Public WebView2 As WebView End Sub Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("Weather") End Sub
Erel B4X founder Staff member Licensed User Longtime User Jun 11, 2023 #2 Your code looks correct. Maybe WebView doesn't render the page while the WebView isn't visible. How long do you need to wait? Upvote 0
Your code looks correct. Maybe WebView doesn't render the page while the WebView isn't visible. How long do you need to wait?
drgottjr Expert Licensed User Longtime User Jun 12, 2023 #3 no see, no render. what does this mean: webview running in the background Click to expand... ?? Upvote 0
C csjoe72 Member Licensed User Longtime User Jun 13, 2023 #4 Erel: maybe an half second grgottjr: I use more layouts Upvote 0
H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Jun 13, 2023 #5 csjoe72 said: It loads, but only when the page is appeared, so I have to wait for the content. Click to expand... Use alternatives like okhttp Upvote 0
csjoe72 said: It loads, but only when the page is appeared, so I have to wait for the content. Click to expand... Use alternatives like okhttp