public void setOffscreenPageLimit ( int limit ) { if ( limit < DEFAULT_OFFSCREEN_PAGES ) { Log . w ( TAG , "Requested offscreen page limit " + limit + " too small; defaulting to " + DEFAULT_OFFSCREEN_PAGES ) ; limit = DEFAULT_OFFSCREEN_PAGES ; } if ( limit != mOffscreenPageLimit ) { mOffscreenPageLimit = limit ; populate ( ) ; } }
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 .