Android Question [RESOLVED] Dip cut label

MarcoRome

Expert
Licensed User
Hi All.
I would like to understand how to solve the layout problem once and for all.
I have this code:
B4X:
clv_assegna.Add(CreateListItem(cs, clv_assegna.AsView.Width, 50dip, i, ""), "")
As you see i call 50dip, inside CLV recall this simple label:

upload_2019-3-20_10-8-3.png


Now on the samsung 7, 8, 5 and another device i have this result:

upload_2019-3-20_10-8-38.png


on the Samsung Note 9 i have this result:

upload_2019-3-20_10-9-2.png


Any final solution ?
Thank you again
Marco
 

MarcoRome

Expert
Licensed User
What is the code of your CreateListItem?
What version of xcustomlistview?
Hi Don.

1)
B4X:
Sub CreateListItem(Text As String, Width As Int, Height As Int, riga As Int, passa_id As String ) As Panel
    Dim p As Panel
    p.Initialize("")
    #if B4A
    p.SetLayout(0, 0, Width, Height)
    #else if B4i
        p.SetLayoutAnimated(0, 1, 0, 0, Width, Height) 'set the size before the layout is loaded
    #End If
    
    p.LoadLayout("lay_cap_clv")

    lbl_cap.Text = Text


    Return p
End Sub
2) XUI View 1.87
 
Top