Possible Duplicate:
How to update Android ListView with dynamic data in real time?
I have a custom listview
working with a time value
and some buttons
to click in it. I currently have the time updated every second via notifyDataSetChanged()
in a one second handler method.
This works nicely in updating the time. Unfortunately though it means the views are recreated every second. This means my button press operation isn't very responsive as each time the view is regenerated the button is reset. So if you are pressing a button while the view changes, the press becomes invalid and you have to release the button and then press it again. With a long press the problem is even worse as there isn't enough time to register a long press before the view is regenerated. So a long press never happens.
Is there a way to change data within the listview without have to regenerate the whole view?