Back to project page androidui.
The source code is released under:
MIT License
If you think the Android project androidui listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
// This project requires the v13 support library. // See http://developer.android.com/tools/support-library/setup.html for more information // w w w . j a v a2 s .c om package course.examples.UI.ViewPager; import android.app.Activity; import android.os.Bundle; import android.support.v4.view.ViewPager; public class GalleryWithViewPagerActivity extends Activity { private ImageAdapter mImageAdapter; private ViewPager mViewPager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mViewPager = (ViewPager) findViewById(R.id.pager); // Create a new ImageAdapter (subclass of FragmentStatePagerAdapter) mImageAdapter = new ImageAdapter(getFragmentManager(), this); // Set the Adapter on the ViewPager mViewPager.setAdapter(mImageAdapter); } }