I need to set a custom color to a list item based on a property of item from adapter and I can not use a selector (condition for item to have custom color is an item property, not a selected or focused state). In getView method I set
view.setBackgroundColor(R.color.blue)
but this does not works because it doesn’t matter what color I set for background, the result is the same. I tried to set background color to the layout but the result is the same. Can you please give me a clue? Thanks
use ,
it will work.