Code example for ImageSwitcher

Methods: setImageURI

0
} 
 
@SuppressWarnings("unchecked") 
public void onItemSelected(AdapterView parent, View v, int position, long id) {
	photoid = position;
	mSwitcher.setImageURI(mImageIds[position]);
} 
 
@SuppressWarnings("unchecked") 
public void onNothingSelected(AdapterView parent) {
} 
 
public View makeView() {
    ImageView i = new ImageView(this);
    i.setScaleType(ImageView.ScaleType.FIT_CENTER);
    i.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT,
            LayoutParams.FILL_PARENT));
    return i;
}  
 
@Override