0

I have an expandable listview. The Items already use selectors. Now when I add a new item, I want that it is colored green and then slowly fades to the color it has in its enabled state (light grey). So people recognize easily which item was just added and they see a change instead of just getting an updated exp listview.

Thanks in advance.

1 Answers1

0

I think you could achieve this by adding a "tag", like timesetamp to your list child. And in your getChildView you can compare the timestamp to actual date/time, when the difference is less for example than 5 minutes then you can change the background color, if more/equals then set the default child background. Disadvantage is that the background will change again only when the list is notified that changes occured.

Or simply the tag can be "new" for new list child, after some time you can change it to "old" and also change the bg color depending on the tag.

I hope you understand my concept? :)

Nexowski
  • 335
  • 1
  • 10
  • It's not a problem to check which are the new ones, since the List gets their childs out of a Database. But when i start the activity, I want to color it green and then it shall fade automatically. It's no problem to color those new ones, but to fade the color, like an animation, that's the problem. – user3736001 Jun 13 '14 at 12:45