title: SurfaceView with ViewPager in API level 10 has a long delay during a new transition
body: <p>I have a very similar question to: 
  <a href="https://stackoverflow.com/questions/11356085/android-viewpager-surfaceview-long-delay-when-navigating-back-to-activity">ViewPager + SurfaceView = long delay when navigating back to activity</a></p>
  
  <p>Except that I am using API 10 and so I am not using fragments.</p>
  
  <p>I have SurfaceViews in the ViewPager - and I have that working well, except that when I scroll to a new page, it takes a while to draw.  It is not until the SurfaceView is visible on screen that the SurfaceView.surfaceCreated method is called. I would like to have the surface created at the time that ViewPager's PagerAdapter.instantiateItem is called and the SurfaceView is added to the ViewPager via addView. Is there a way to force the SurfaceView to create a surface at that point?  </p>
  
  <p>I am using code based on the <a href="http://code.google.com/p/viewpagerexample/source/browse/trunk/AwesomePager/src/com/geekyouup/paug/awesomepager/AwesomePagerActivity.java" rel="nofollow noreferrer">Awesome Pager example</a></p>
  
  <pre><code>        @Override
          public Object instantiateItem(View collection, int position) {
              Log.i("Main Activity", "instantiateItem p:" + position);
              View p;
              if(position == 1){
                      // Page003 is a surfaceview
                  p = new Page003(cxt, position);
              } else {
                      // in the future I will create more pages!
                  p = new Page003(cxt, position);
              }
              ((ViewPager) collection).addView(p);
  
              return p;
          }
  </code></pre>
  
  <p>Is there a method similar to the answer in the other question - by wrapping the SurfaceView in another view? I'd rather not complicate the code unnecessarily.</p>