Hi i fairly know programming but the issue here is that i am parsing data from json. Therefore my goal is to set the background color of each row based on the condition that when the item is either;
Dog or Cat or Elephant or Rhino or Lion their respective list view background color should be blue, red, yellow, green
{
"pets" : {
"dog_id" : 1,
"dog_name" : "Dave",
"cat_id" : 2,
"cat_name" : "Prudie"
"elephant_id" : 3,
"elephant_name" : "Poncho",
"lion_id ": 4
"lion_name" : "King"
}
}
Kindly help, I can parse this JSON but I want the listView to show different colors. So far I can change the whole background of the listView, text of each item but failed to do the row colors conditionally.
You have to