Auto-refresh a ListView within a ViewPager?

215 Views Asked by At

I'm having a bit of trouble approaching an auto-refresh design I want to implement.

Currently I have a TitlePageIndicator that sets its view pager with a PagerAdapter. Each page in the view pager is a listview that is constructed based on a list of date strings.

In my instantiateItem() method, I call an AsyncTask to load data based on the date. This works well, and loads the way I want.

I recently changed all my listviews to PullToRefresh list views, in order to make sure a user could update the data on a date they wished to have the most up-to-date info on. (This also works the way I desire).

However now I want to somehow refresh a certain date in the view pager (Current date for instance) - every 60 seconds. So I'm not refreshing all the listivews in the viewpager, i'm just refreshing the one I want.

I started making a timer thread based on this :

Update TextView within custom ListView

But soon got very stumped and I'm not sure what to do next..

Can someone point me in the right direction?

0

There are 0 best solutions below