Я получил следующее json
{
"data": [
{
"name": "apple",
"sorts": [
{ "name": "green", "number": "6", "comment": "green apples are nice" },
{ "name": "yellow", "number": "1" },
{ "name": "red", "number": "2" }
]
},
{
"name": "banana",
"sorts": [
]
},
{
"name": "pear",
"sorts": [
{ "name": "green", "number": "6", "comment": "green pears are sour" },
{ "name": "purple", "number": "0", "comment": "so far we haven't seen purple pears" }
]
}
]
}
Вот результат, который мне нужен:
I created this with 2 nested list and passing the name to the nested list.
This works well, but now I want to color the odd list items. That would be the Yellow Apples and Green Pears. I found some example on how to do that on a simple list, but I have a nested list so that won't work.
JRXML:
<?xml version="1.0" encoding="UTF-8"?>