Sub Adv1_ReceiveAd
Dim ctxt As JavaObject
ctxt.InitializeContext
' Obtém o objeto nativo do AdView através de JavaObject
Dim adJo As JavaObject = AdViewInline
Dim currentAdSize As JavaObject = adJo.RunMethod("getAdSize", Null)
If currentAdSize.IsInitialized Then
Dim realHeight As Int = currentAdSize.RunMethod("getHeightInPixels", Array(ctxt))
LogColor("Altura real após carregar: " & realHeight, xui.Color_Magenta)
'If you need to dynamically update the item's height in the CLV:
'1. Locate the item's index where the listing is located.
'2. Resize the panel and update the CLV with clvHome.ResizeItem
End If
End Sub