我想在我的应用程序中插入图像开关,那么我现在该怎么办?这需要 imageadapter 那么我该如何实现呢?请帮助我..谢谢你....
这是我的代码...
Integer pics[] = { R.drawable.amrapali1, R.drawable.defic1, R.drawable.hnsafal1, R.drawable.leela1, R.drawable.mitashi1, R.drawable.magnanimous1, R.drawable.moon1, R.drawable.netpeckers1, R.drawable.nggroup1, R.drawable.platinum1, R.drawable.shivalik1, R.drawable.trikon1 };
ImageSwitcher iSwitcher;
iSwitcher = (ImageSwitcher) findViewById(R.id.ImageSwitcher);
iSwitcher.setFactory(this);
iSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_in));
iSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_out));
Gallery gallery = (Gallery) findViewById(R.id.Gallery);
gallery.setAdapter(new ImageAdapter(this));
gallery.setOnItemClickListener(new OnItemClickListener() {
});