How to display a simple graphic

RichardK

Member
Licensed User
Longtime User
Newbie Question - I am trying to display a graphic: why does this not work?
(The imgCard place-holder remains blank). Many thanks in advance

Sub Globals
Dim imgCard As ImageView
Dim btnStart As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Comment: Main includes an ImageView named imgCard and btnStart

Activity.LoadLayout("Main")

End Sub

Sub btnStart_click
'Comment: file "c01.jpg added to the project via "Add Files"

imgCard.Initialize("")
imgCard.bitmap = LoadBitmap(File.DirAssets, "c01.jpg")
End Sub
 
Still a problem

Thanks Klaus, Line removed - however i now get the message in the emulator "Program paused on line 15 (followed by the "imgCard. . ." line of code. The code itself has turned yellow. Any further thoughts will be gratefully received. RichardK
 
Upvote 0
Stack trace and complete project woul help

Can you provide the stack trace and your project (export as zip)?
 
Upvote 0
Thank you very much

I am amazed - I was sure that that was one of the combinations I had tried. Apparently not. Thanks again - I was on the point of total insanity. Richard
 
Upvote 0
Back
Top