@Override
public Object instantiateItem(ViewGroup container, int position) {
View itemView = mLayoutInflater.inflate(R.layout.viewpager_item, container, false);
ImageView imageView = (ImageView) itemView.findViewById(R.id.imageView);
if(count== 1){
imageView.setImageResource(mThumbIds[firstposition]);
count++;
position=firstposition;
}
else
{
imageView.setImageResource(mThumbIds[position]);
}
container.addView(itemView);
return itemView;
}