Backgrounds not loading properly.
To Postasat and others that might benefit. First off, thanks Postasat, you technique worked, with slight changes for me. I did exactly as you mentioned. Here's the Sub:
Dim BackGndImage As BitmapDrawable
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
getdtc.Initialize("")
Activity.AddView(getdtc, 0, 0, 100%x, 100%y)
getdtc.LoadLayout("dtc")
getdtc.Visible = True
BackGndImage.Initialize(LoadBitmap(File.DirAssets, "background medium.jpg")) '<--Added this
Activity.Background = BackGndImage '<--Added this
End Sub
I also added this Sub...
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then '<--If BACK key then End current Activity.
Activity.RemoveAllViews
Activity.Finish
End If
End Sub
Now the background loads as expected and have tested it many times. From what I can see, Basic4Android is having a hard time loading from the Visual Interface. When the background is in code then it works fine and like you said, load it on the Activity_Create. Thanks...
PS. I'm also having the same issue with loading Views, so have a feeling this will also do the trick. Not professional, but works...