With the assistance of DonManfred I have a ListView populating great.
Is it possible to increase the size (height) of the the list to accomodate very large text on Line2?
Can the text within Line2 be wrapped?
my code is:
Is it possible to increase the size (height) of the the list to accomodate very large text on Line2?
Can the text within Line2 be wrapped?
my code is:
B4X:
lvPartners.clear
Dim Curs As Cursor
Curs = Starter.SQL0.ExecQuery("SELECT * FROM partners")
If Curs.RowCount = 0 Then
ToastMessageShow("There are no Current Partners",False)
Activity.Finish
Else
lvPartners.SingleLineLayout.ItemHeight = 1dip
lvPartners.SingleLineLayout.Label.Color = Colors.LightGray
lvPartners.TwoLinesAndBitmap.ItemHeight = 120dip
lvPartners.TwoLinesAndBitmap.ImageView.Height = 120dip
lvPartners.TwoLinesAndBitmap.ImageView.Width = 120dip
lvPartners.TwoLinesAndBitmap.Label.TextColor=Colors.Black
lvPartners.TwoLinesAndBitmap.Label.TextSize = 20
lvPartners.TwoLinesAndBitmap.Label.Left = (((lvPartners.TwoLinesAndBitmap.ImageView.Left) + (lvPartners.TwoLinesAndBitmap.ImageView.Width)) + 5dip)
For i=0 To Curs.RowCount-1
Curs.Position=i
Dim Buffer() As Byte
Dim PartnersHeader As String
Dim PartnerText As String
Buffer = Curs.GetBlob("partnerimage")
PartnersHeader = Curs.GetString("partnername")
PartnerText = Curs.GetString("partnertext")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
lvPartners.AddTwoLinesAndBitmap((" " & CRLF & PartnersHeader), " " & PartnerText , Bitmap1)
lvPartners.AddSingleLine("")
Next
Curs.Close
pnlPartners.Visible = True
End If