b4a custom view stay empty space

399 Views Asked by At

i use native ads inside customListView module in my b4a project.

when for any reason ads not loaded the space for ads stay empty.

how can i fill the empty space ?

this my code :

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
indicative.SetBackgroundImage(LoadBitmap(File.DirAssets,"8.png"))

magnet.Initialize
magnet.SetTestMode(False)


Panel1.Initialize("")
Panel2.Initialize("")
Dim b As Button
b.Initialize("")
b.Text="hello"
Panel2.AddView(b,0,0,20%x,20%y)
b.SetLayout(0,0,20%x,20%y)

sv.Initialize(Me,"sv")
Activity.AddView(sv.AsView,0,0,100%x,100%y)

For i=0 To 10
    Dim p As Panel
    p.Initialize("")
    magnet.BindView(title,description,cta,icon,mainImage,indicative,Panel)
    sv.Add(p,320dip,1)
    magnet.LoadNative("b29f84df-da2f-4b2b-8027-0ece3dbdd26b",p)
    p.LoadLayout("Main")
Next

End Sub

and this my visual designer :

screen of visual designer

and my final view that empty space :

screen of final view

How do I solve this problem? Thankful

0

There are 0 best solutions below