Hi
While I am running the below (Trying to load pictures 10 x 10) it crashes on different errors (Tried few things)
Based on also the following example I wrote:
https://www.b4x.com/android/forum/threads/b4x-bitmapcreator-layout-implode-animation.92141/#content
class global: Private img(101) As B4XView
While I am running the below (Trying to load pictures 10 x 10) it crashes on different errors (Tried few things)
Based on also the following example I wrote:
https://www.b4x.com/android/forum/threads/b4x-bitmapcreator-layout-implode-animation.92141/#content
class global: Private img(101) As B4XView
B4X:
Sub ArrangeSquares()
Dim calcX, calcY As Int
Dim Width, Height As Int
Dim Counter As Int = 1
calcX = 0dip
calcY = 0dip
Width = (1280 / 2 / 160)*16dip
Height = (800 / 2 / 160)*16dip
For i=1 To 10
For x=1 To 10
Dim iv As ImageView
iv.Initialize("img" & i & x)
Dim img(Counter) As B4XView = iv
Log(Counter & "," & i & "," & x)
img(Counter) = xui.LoadBitmap(File.DirAssets,"row-" & i & "-col-" & x & ".png")
Root.AddView(img(Counter), calcY, calcX, Width, Height)
img(Counter).Tag = i & x
calcY = calcY + Width
If Counter = 100 Then
Exit
Else
Counter = Counter + 1
End If
Next
calcY = 0dip
calcX = calcX + Height
Next
End Sub