Reputation: 5
Is there is any equivalent to ItemAdded event in android listview? basically I want to check if the new item has some attributes or values then I will do some coloring on it. I don't want to loop over all items once loading is done, even though I have no idea how to do it :)
Upvotes: 0
Views: 76
Reputation: 3080
You need to update the data that is used in the adapter in your listview.
After updating the data.. there is one method in adapter called notifyDataSetChanged()
which will refresh the adapter.
Now in adapter's getView()
method,
implement the logic that can change the color..
Hope it will help you..!!
Upvotes: 1