Back to project page african-art-talent-discovery.
The source code is released under:
GNU General Public License
If you think the Android project african-art-talent-discovery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.appsng.adapters; /* w ww . j a v a2s . c o m*/ import java.util.List; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; public class ImagePagerAdapter extends PagerAdapter { private List<ImageView> images; public ImagePagerAdapter(List<ImageView> images) { this.images = images; } @Override public Object instantiateItem(ViewGroup container, int position) { ImageView imageView = images.get(position); container.addView(imageView); return imageView; } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView(images.get(position)); } @Override public int getCount() { return images.size(); } @Override public boolean isViewFromObject(View view, Object o) { return view == o; } }