Hello,
can someone please show me, how lo add an Image to an ImageView?
I am too stupid. :-(
I always get "java.lang.RuntimeException: Error loading bitmap.", although the image exists.
Thanks!
can someone please show me, how lo add an Image to an ImageView?
I am too stupid. :-(
example:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private ImageView As ImageView
Private Button1 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
End Sub
Sub Button1_Click
If File.Exists(File.DirInternal, "test.png") = True Then
ImageView.Bitmap = LoadBitmap(File.DirInternal, "test.png")
End If
End Sub
I always get "java.lang.RuntimeException: Error loading bitmap.", although the image exists.
Thanks!
Last edited: