After a look at the source of ViewPager.java.

/**
     * Set the number of pages that should be retained to either side of the
     * current page in the view hierarchy in an idle state. Pages beyond 
this
     * limit will be recreated from the adapter when needed.
     *
     * <p>This is offered as an optimization. If you know in advance the 
number
     * of pages you will need to support or have lazy-loading mechanisms in 
place
     * on your pages, tweaking this setting can have benefits in perceived 
smoothness
     * of paging animations and interaction. If you have a small number of 
pages (3-4)
     * that you can keep active all at once, less time will be spent in 
layout for
     * newly created view subtrees as the user pages back and forth.</p>
     *
     * <p>You should keep this limit low, especially if your pages have 
complex layouts.
     * This setting defaults to 1.</p>
     *
     * @param limit How many pages will be kept offscreen in an idle state.
     */
    public void setOffscreenPageLimit(int limit);

Hope it helps.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to