I've narrowed down my issue to this...
Both ImageViews are created in the designer. But the first image shows properly, and the other crashes with the dump saying " java.lang.RuntimeException: Object should first be initialized (B4XView). " (on line 18 above).
The Log lines above show the first one, ivLogo, as True, but the second one as False.
Huh?
There is no initialize method for a B4X Image View, so not sure what else I should be doing before this.
Any clues?
Thanks.
B4X:
Sub Class_Globals
Private ivLogo As B4XView
Private ivSettings As B4XView
End Sub
...
Private Sub B4XPage_Created (Root1 As B4XView)
...
Dim b As Bitmap
Log("ivLogo is initialized = " & ivLogo.IsInitialized) ' Shows true
b.Initialize(File.DirAssets, "Logo-C-v03-160x120-3C-BlackBG.bmp")
ivLogo.SetBitmap(b)
Dim gearBmp As Bitmap
Log("ivSettings is initialized = " & ivSettings.IsInitialized) ' Shows false
gearBmp.Initialize(File.DirAssets, "Gear-Green.bmp")
ivSettings.SetBitmap(gearBmp)
...
End Sub
Both ImageViews are created in the designer. But the first image shows properly, and the other crashes with the dump saying " java.lang.RuntimeException: Object should first be initialized (B4XView). " (on line 18 above).
The Log lines above show the first one, ivLogo, as True, but the second one as False.
Huh?
There is no initialize method for a B4X Image View, so not sure what else I should be doing before this.
Any clues?
Thanks.