Hi..
i follow this example to create a list (https://www.b4x.com/android/forum/threads/cards-list-with-customlistview.87720/#content),
but the CLV CustomListView Object change the height dimension when i try it in debug and release mode.
In the design mode i create a CLV object with a little dimension, but when i try the app,it goes at the end of display (back of another object).
This is my code:
You can see the attached image.
How i can solve it?
Thank you.
i follow this example to create a list (https://www.b4x.com/android/forum/threads/cards-list-with-customlistview.87720/#content),
but the CLV CustomListView Object change the height dimension when i try it in debug and release mode.
In the design mode i create a CLV object with a little dimension, but when i try the app,it goes at the end of display (back of another object).
This is my code:
B4X:
For Each conv As Map In conversation
Dim message As String = conv.Get("message") & ""
Dim currentUser As String = conv.Get("isCurrentUser") & ""
Dim text2 As StringUtils
Dim b() As Byte = text2.DecodeBase64(message)
Dim messaggio As String = BytesToString(b,0,b.Length,"UTF-8")
CLV1.Add(CreateItem(messaggio,currentUser,userPhotoReceiver, pnlChatLettura.Width), "")
Next
B4X:
Private Sub CreateItem(messaggio As String, currentUser As String, userPhotoReceiver As String,Width As Int) As Panel
Dim p As B4XView = xui.CreatePanel("")
Dim height As Int = 75dip
p.SetLayoutAnimated(0, 0, 0, Width, height)
If currentUser Then
p.LoadLayout("cellMessageCurrentUser")
Else
p.LoadLayout("cellMessageOther")
End If
Dim links_foto As Map
links_foto.Initialize
If currentUser Then
Dim photourl As String = fp.leggi_parametro("photo","")
links_foto.Put(ImageView2, photourl)
Else
links_foto.Put(ImageView1, userPhotoReceiver)
End If
CallSubDelayed2(ImageDownloader, "Download", links_foto)
lblContent.Text="" & messaggio
lblContent.BringToFront
Return p
End Sub
You can see the attached image.
How i can solve it?
Thank you.