Private Sub CreateDeals(url As String, img As String) As Panel
Dim p As B4XView = xui.CreatePanel("")
#if b4a
p.setlayoutanimated(0,0%x,0%y,100%x,21%y)
#else if b4i
p.setlayoutanimated(0,0%x,0%y,100%x,180dip)
#end if
p.LoadLayout("card_deals")
deal_url.Text = url
#if b4a
MediaManager.SetMedia(deals_iv, Starter.strURL & "deals/" & img)
#else if b4i
MediaManager.SetMedia(deals_iv, Starter.strURL & "deals/" & su.EncodeUrl(img, "utf8"))
#end if
Return p
End Sub