Android Question Add image view to panel

zani

Member
Licensed User
Longtime User
hi i have this code :
B4X:
Dim zane As ImageView
Dim left1 , top1 As Int
        left1 =4.3%x
        top1 = 3%x
zane.Initialize("")
        For i = 1 To 15
            Dim p As Panel
            p.Initialize("p")
            p.Background=bi
            'zane.Background=
           
       
       
       
            ScrollView1.Panel.AddView(p,left1,top1,30%x,20%y)
           
            p.AddView(zane,0,0,100%x,100%y)
            zane.SetBackgroundImage(LoadBitmap(File.DirAssets,"2_35.png"))
            ScrollView1.SendToBack
            left1 = left1 + 31%x
            p.Tag = i
   
                If i mod 3 = 0 Then
            top1 = top1 + 24%y
            ScrollView1.Panel.Height = top1 + 31%y
            ScrollView1.Height=top1-22%y
            left1 = 4.3%x
                End If
        Next
what is wrong?
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Your question is almost like me saying "I have a piece of string, how long is it?"
What error message are you receiving or how is it not working as you expected? Is it possible for you to upload the zipped project file?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…