How to call invalidate () late on ViewPager

I use TouchDB to replicate a database and display its contents in a series of ListViews in a ViewPager. The problem I'm having is that on the first replication, TouchDB calls it onSuccess () / onPostExecute () before it finishes replicating, i.e. I cannot call invalidate () on my ViewPager to get it to draw ListViews.

Is there any solution for this?

+4
source share
1 answer

You can add an executable file that will be invalid until the end of the execution queue.

myView.post(new Runnable() { @Override public void run() { myView.invalidate(); } }); 

It works?

+3
source

All Articles