If you look at the following code it works if the MsgBox is un-commented in the PageFinished Sub. If left as commented then Java Exception "width and height must be > 0" occurs.
I have tried everything I can think of to resolve this without any joy. Any help is greatly appreciated.
Attached is a Project File which shows this.
Thanks in advance,
Mark S.
I have tried everything I can think of to resolve this without any joy. Any help is greatly appreciated.
Attached is a Project File which shows this.
Thanks in advance,
Mark S.
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim PageView As WebView
PageView.Initialize("PageView")
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.AddView(PageView, 0, 0, 100%x, 100%y)
File.Copy(File.DirAssets, "manual_p1.htm", File.DirInternal, "manual_p1.htm")
PageView.LoadUrl("File:///" & File.DirInternal & "/manual_p1.htm")
PageView.Visible = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub PageView_PageFinished(Url As String)
'Msgbox("Page Finished Loading", "")
Dim PageBmp As Bitmap
PageBmp.Initialize3(PageView.CaptureBitmap)
End Sub
Attachments
Last edited: