iOS Question XCLV, card height problem (iPhone to iPad screens)


Active Member
Licensed User
Longtime User
I`m displaying a list of images in a XCLV, it all looks nice on an iPhone screen (see attached) ... But when viewing on an iPad the cards are cut off (see attached), i understand this is because I`m setting the card height as dip. but as I can't use % in B4i (because of the resize, from what I understand) what is the solution to show the XCLV cards properly?

I've searched the forum but there doesn't seem to be a workable solution.

The 'cards' are designed in the Designer, and anchored left/right and top (see attached), this is the code I`m using to display the cards:

Private Sub CreateDeals(url As String, img As String) As Panel
    Dim p As B4XView = xui.CreatePanel("")
    #if b4a
    #else if b4i
    #end if
    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

Some guidance would be much appreciated.

Thanks, James


  • iPad Mini.jpg
    iPad Mini.jpg
    70.6 KB · Views: 74
  • iPhone SE.jpg
    iPhone SE.jpg
    113.4 KB · Views: 76
  • Deisgner Layout - card.jpg
    Deisgner Layout - card.jpg
    137.8 KB · Views: 78