Android Question Bug? in ListView

timwil

Active Member
Licensed User
Longtime User
B4X:
Sub Globals
    Private xList As ListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.Color = Colors.White

    xList.Initialize("ListOfContacts")
    xList.Color = Colors.White
    xList.TwoLinesLayout.Label.TextColor = Colors.Black
    Activity.AddView(xList,0,0,100%x,92%y)
End Sub


Sub SomeSub
---> This one works as expected       xList.AddTwoLines2(rs.GetString("Celular"),rs.GetString("Name"),rs.GetString("Celular"))
---> This one does NOT                xList.AddTwoLinesAndBitmap2(rs.GetString("Celular"),rs.GetString("Name"),LoadBitmap(File.DirAssets,"logo.png"),rs.GetString("Celular"))
End Sub
 

timwil

Active Member
Licensed User
Longtime User
It seems that when the two lines AND Bitmap is added the first line is forced to WHITE
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Upvote 0

klaus

Expert
Licensed User
Longtime User
What exatly doesn't work?
If you want the text color of TwoLinesAndBitmapLayout.Label to be black you must also define:
xList.TwoLinesAndBitmapLayout.Label.TextColor = Colors.Black
The settings for TwoLinesLayout and TwoLinesAndBitmapLayout are independant.
 
Last edited:
Upvote 0

timwil

Active Member
Licensed User
Longtime User
Thank you

I did not realize they had different layouts

I really need to check the documentation better
 
Last edited:
Upvote 0
Top