How to call invalidate() on viewpager
•
Android
I am using TouchDB to copy the database and display its contents in a series of ListView in ViewPager. The problem I have is that when TouchDB is first copied, the onSuccess () / onPostExecute () method is called before it completes replication, which means that I can not call invalidate () on my ViewPager to get it to draw ListViews..
Is there any solution?
resolvent:
You can add an invalid runnable to the end of the run queue
myView.post(new Runnable() {
@Override
public void run() {
myView.invalidate();
}
});
Does this work?
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码