Possible Duplicate:
ViewPager PagerAdapter not updating the View
I'm new to Android. The first thing I've decided to do is Calendar. I want to display one day's events loaded from Database on each screen (via GridView component). Sliding left is previous day's events. Sliding right is next day' events.
I've looked for some examples of pagers, such as RealViewSwitcher or Deezapps-widget, but they are all have definite number of screens. But I have potencially indefinite number of screens. Also I tried to use only 3 fixed screens and to change their contents while sliding, but this leads to blinking, because after sliding is finished, I change the adapter for gridview and it refreshes contents. For example, I slide to the right and change left screen's gridview adapter from "yesterday" to "today", central screen's gridview adapter from "today" to "tomorrow" and right screen's gridview adapter from "tomorrow" to "day after tomorrow". This approach works fine, but refreshing contents after chaging adapter is not good!
Any ideas about how to adapt one of this pagers to indefinite number of screens?