How to change the color of the item in a listview

Asked

Viewed 437 times

8

I have a listview which is adapted with a SimpleCursorAdapter and that within the listview has two textview, one with a number and one with a name.

I wanted to do so... the listview shows in descending order and I wanted the first 4 to have the color of the blue number and the last quarters to color red.

How do I do that?

  • 2

    It would be like you add some part of what you have already done. Try to insert at least how you are mounting the Simplecursoradapter. This will make it easier to obtain more precise answers.

  • 2
  • 2

    @ramaral looks even duplicated.

  • 1

    Our lady, this one has gone far you see? where both questions are equal? We are talking here of changing the color of ordered numbers, in case change the first four and the last four, and not change the background color of the whole list as in the other issue. I am already looking for a way to classify them in a group, not with numbers, with letters, for example: A green, B pink, C Lilas and so on.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.