Hi, can you tell me what is missing in this simple code to view the image in ImageView? I am surely missing something obvious.
B4X:
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private ImageView1 As ImageView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("imgview") 'Load the layout file.
MainForm.Show
ImageView1.SetImage(fx.LoadImage(File.DirApp & "\Images", "Android.bmp"))
End Sub
The image is in the correct folder (no path error), ImageView1 was added with the designer and is the same size as the image.
Are you sure it can load a bmp file, as I have only used png or jpg images.
Maybe try loading into an Image control then use that for the ImageView.SetImage(img)
Are you sure it can load a bmp file, as I have only used png or jpg images.
Maybe try loading into an Image control then use that for the ImageView.SetImage(img)