Android Question How add an image to a single line

lock255

Well-Known Member
Licensed User
Longtime User
How do I add an image to a single line?
B4X:
ListView1.AddSingleLine("Hello")
 

LucaMs

Expert
Licensed User
Longtime User
You can only using AddTwoLinesAndBitmap, but set TwoLinesAndBitmap.SecondLabel.Height = 0

B4X:
    Private bmp As Bitmap
bmp = LoadBitmapSample(File.DirAssets, "preferences.png", 35dip, 35dip)

ListView1.TwoLinesAndBitmap.ItemHeight = 35dip
ListView1.AddTwoLinesAndBitmap("aa", "", bmp)
ListView1.TwoLinesAndBitmap.SecondLabel.Height = 0
ListView1.AddTwoLinesAndBitmap("bb", "ciao", Null) ' <-----
ListView1.AddTwoLinesAndBitmap("cc", "", bmp)
 
Last edited:
Upvote 0
Top