Code example for ImageSwitcher

Methods: setImageURI

0
        pList = OtherUtils.getSdFile(SysArgs.SD,SysConts.fms);
		gal_5show.setAdapter(new BGalley5Adapter(this,pList));
	    gal_5show.setOnItemClickListener(new OnItemClickListener() {
	    	@Override 
			public void onItemClick(AdapterView<?> adater, View v, int index, long id) {
				gal_5is.setImageURI(Uri.parse(pList.get(index)));
				gal_5path.setText(pList.get(index));
			} 
	    }); 
        gal_5is.setFactory(new ViewFactory() {
			@Override 
			public View makeView() {
				ImageView iv = new ImageView(BGalley5.this);
				iv.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
				iv.setPadding(2,2,2,2);
				iv.setBackgroundColor(0xFF00FFFF);
				iv.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
				return iv;
			} 
		}); 
        gal_5is.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_in));