Hi there,
Just new to B4A, I've started tosearch and read the manual but ...
The code :
Sub Globals
Dim images As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1") ' layout1 contents 'img1.jpg'
For cpt=0 To 2
Dim img As ImageView
img.Initialize("")
img.Bitmap=LoadBitmap(File.DirAssets,"img1.jpg")
'img.Left=100*cpt
img.Top=100
images.Add(img)
Next
For cpt=0 To images.Size-1
Log(images.Get(cpt).Left)
Next
End Sub
The questions & things I misunderstand :
1°) How to Initialize an ImageView ?
if obj.Initialize("") enough ?
Not clearly found in the docs ... (and how to know how initialize other object ?)
2°) It seems that img is not an ImageView object, as I can't assigne Left and Top properties.
If tried (img.Top = 100) raises an error (null object)
Should be a bad initialization, cf n°1 !
3°) How to read the property Left as in : (images.Get(cpt).Left
BTW, images.Get(x).Bitmap also raises an error ... but not the assignation in 1st loop
B4A seems to be a great product ... but hard to start
Thks in advance,
and sorry if these questions seem stupid.