Android Question Table row colours

David Elkington

Active Member
Licensed User
Longtime User
He Everyone,

I have an app that displays a load of data (jobs) in a table, and now I want to assign particular rows different colours depending on a status value against the record. I am guessing this can be done, but now sure how to do it. The data is in a SQLite database and there is a routine to fill the table, but I am unsure where to put my code to change the colour of the text dependant on a value in the table.

David
 
You are talking about WHICH table exactly?
HOW are you displaying it? With which library?
 
Upvote 0
There is no such object. The Object is customlistview or xcustomlistview.

In both cases you are free to add any design you want, use the colors you want.

I can´t answer about flexible table view. As it is a class; check the source and edit it like you wish
 
Upvote 0
It is currently not possible to set specific colors for rows nor for cells.
It is only possible to set different colors for odd and even rows.

@DonManfred
David is using the FlexibleTable class, which exist also as a CustomView.
 
Upvote 0
I thought as much, many thanks. I think I am going to have to put a text status in there until I can work out if ListView would work for my app.
 
Upvote 0
Back
Top