Greetings everyone,
I'm trying out a WebView for the first time and have what probably is a stupid question, but I hope you can be patient with me.
In the designer I added a WebView. In my code, I used the following code to supposedly load an URL into the WebView and match the WebView width and height to match the same from the Activity. I noticed that the width and height properties were not available as shown in the attached screen shot. I also noticed the web page is not loading up in the WebView. What's missing on my part and how do I access the width and height properties?
If you know of a link to a sample project that uses a WebView to display a web site, that would also be helpful.
Thanks.
I'm trying out a WebView for the first time and have what probably is a stupid question, but I hope you can be patient with me.
In the designer I added a WebView. In my code, I used the following code to supposedly load an URL into the WebView and match the WebView width and height to match the same from the Activity. I noticed that the width and height properties were not available as shown in the attached screen shot. I also noticed the web page is not loading up in the WebView. What's missing on my part and how do I access the width and height properties?
If you know of a link to a sample project that uses a WebView to display a web site, that would also be helpful.
Thanks.
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private WebViewABRICC As WebView
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
WebViewABRICC.LoadUrl("https://mawaqit.net/en/abricc-acton-01720-united-states")
' WebViewABRICC.Width = Activity.Width
' WebViewABRICC.Height = Activity.Height
Attachments
Last edited: