Code example for ViewSwitcher

Methods: addViewgetChildAt, getTag, setOnClickListener, setPadding, setTag

0
			lViewSwitcher = (ViewSwitcher) aConvertView;
		} 
	 
 
		ViewTagInformation lTagHolder = (ViewTagInformation) lViewSwitcher
				.getTag();
 
		if (lTagHolder == null || 
			!lTagHolder.aImagePath.equals(lPath)) {
			// The Tagholder is null meaning this is a first time load 
			// or this view is being recycled with a different image 
			 
			// Create a ViewTag to store information for later 
			ViewTagInformation lNewTag = new ViewTagInformation();
			lNewTag.aImagePath = lPath;
			lViewSwitcher.setTag(lNewTag);
 
			// Grab the image view 
			// Have the progress bar display 
			// Then queue the image loading 
			ImageView lImageView = (ImageView) lViewSwitcher.getChildAt(1);
			lViewSwitcher.setDisplayedChild(PROGRESSBARINDEX);
			mImageLoader.queueImageLoad(lPath, lImageView, lViewSwitcher);
			 
 
		}