Change background colour of ListView item based on SimpleCursorAdapter field?
-
11-11-2019 - |
Question
I have a custom ListView item using RelativeLayout which looks like this...
| Time | Title |
| | Description |
NOTE: The lefthand 'Time' is a single full height TextView with 'Title' and 'Description being individual 'stacked' TextViews.
The ListView items represent TV programmes extracted from a SQLite DB with a SimpleCursorAdapter. This works fine but the next step is to indicate when a programme has been scheduled to record (the app is an Android client for a PC-based PVR application).
The SQL query selects 'start_time,title,description,is_set_to_record' the first three being text fields to bind to the TextViews and the last being boolean.
It seems I probably need to extend SimpleCursorAdapter so if 'is_set_to_record' is true then I set the background colour of all three TextViews to a different colour. The problem is that I don't know where I should be looking to do this.
Is this possible? If so, any pointers to where I should look would be appreciated.
No correct solution