title: Slideshow in android viewpager?
body: <p>I have problem with android viewpager slideshow. I want to show the viewpager layout after a minimum time period. Here is my code sample. 
  <strong>My main class:</strong>  </p>
  
  <pre><code>public class MainActivity extends Activity {
      private ViewPager mViewPager;
      private SwipeAdapter adapter;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mViewPager = (ViewPager) findViewById(R.id.pager);
          // set the adapter
          adapter = new SwipeAdapter(MainActivity.this);
          mViewPager.setAdapter(adapter);
  
          mViewPager.setOnPageChangeListener(new OnPageChangeListener() {
  
              @Override
              public void onPageSelected(int position) {
              }
  
              @Override
              public void onPageScrolled(int arg0, float arg1, int arg2) {
              }
              @Override
              public void onPageScrollStateChanged(int arg0) {
              }
          });
      }
  
  }
  </code></pre>
  
  <p><strong>My Adapter class:</strong></p>
  
  <pre><code>public class SwipeAdapter extends PagerAdapter {
  
      private LayoutInflater mInflater;
      private static int[] mLayouts = { R.layout.view_layout1,
              R.layout.view_layout2, R.layout.view_layout3, R.layout.view_layout4 };
  
      SwipeAdapter(Context context) {
          mInflater = LayoutInflater.from(context);
      }
  
      @Override
      public void destroyItem(ViewGroup container, int position, Object object) {
          container.removeView((View) object);
      }
  
      @Override
      public Object instantiateItem(ViewGroup container, int position) {
          ViewGroup pageView = (ViewGroup) mInflater.inflate(mLayouts[position],
                  container, false);
          container.addView(pageView);
          getItemPosition(pageView);
          return pageView;
      }
  
      @Override
      public int getCount() {
          return mLayouts.length;
      }
      @Override
      public boolean isViewFromObject(View view, Object obj) {
          return view == obj;
      }
  }
  </code></pre>
  
  <p>suppose that I want to make the viewpager layout auto sliding after 10 seconds. How can it possible. </p>