Android Question how to draw a grid of imageviews inside scrollview ?

PassionDEV

Well-Known Member
Licensed User
here what I have tried and where I am stuck

B4X:
Sub Globals
    Private IconsGrid(101) As ImageView
    Private scrollGridimages As ScrollView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    For i = 0 To 100
        IconsGrid(i).Initialize("IconsGrid")
        IconsGrid(i).width = 30dip
        IconsGrid(i).height = 30dip
        ' here i am not sure what i have to do
        ' to draw a grid programatically into scrollview
        ' as example 6 images per row
    Next
End Sub


i am not actually sure how to draw the images inside the view as a grid and allow scrolling
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You will not get far using ScrollView.
Use xCLV instead.

 
Upvote 0
Top