Code example for ImageSwitcher

Methods: setImageResource

0
 
	@Override 
	public void onItemSelected(AdapterView<?> parent, View view, int position,
			long id)
	{ 
		imageSwitcher.setImageResource(resIds[position % resIds.length]);
 
	} 
 
	@Override 
	public void onNothingSelected(AdapterView<?> parent)
	{ 
	} 
 
	@Override 
	public View makeView()
	{ 
		ImageView imageView = new ImageView(this);
		imageView.setBackgroundColor(0xFF000000);
		imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
Contextual code suggestions in your IDE  Get Codota for Java