Tutorial :Updating the relative time in android



Question:

I am developing a Twitter client application. As with other twitter clients, I would like to display the relative time of tweet with respect to the current time. I am using a list view and a Simple adapter that binds to an arraylist which stores the tweet information. If I calculate the relative time and store a string, I will be just storing static data which will never get updated. How should I update this data?? Is there any way to do this?


Solution:1

You will have to incorporate on your adapter a recalculation every X seconds. And if you update your adapter, the listview will update itself too.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »