private int measureWidth(int measureSpec){
  int result=0;
  int specMode=MeasureSpec.getMode(measureSpec);
  int specSize=MeasureSpec.getSize(measureSpec);
  if (specMode == MeasureSpec.EXACTLY) {
    result=specSize;
  }
 else {
    int count=2;
    if (mImageSwitcher != null) {
      count=mImageSwitcher.getViewCount();
    }
    result=(int)(getPaddingLeft() + getPaddingRight() + (2 * mRadius)+ (count - 1) * spacing);
    if (specMode == MeasureSpec.AT_MOST) {
      result=Math.min(result,specSize);
    }
  }
  return result;
}

private int measureWidth ( int measureSpec ) { int result = 0 ; int specMode = MeasureSpec . getMode ( measureSpec ) ; int specSize = MeasureSpec . getSize ( measureSpec ) ; if ( specMode == MeasureSpec . EXACTLY ) { result = specSize ; } else { int count = 2 ; if ( mImageSwitcher != null ) { count = mImageSwitcher . getViewCount ( ) ; } result = ( int ) ( getPaddingLeft ( ) + getPaddingRight ( ) + ( 2 * mRadius ) + ( count - 1 ) * spacing ) ; if ( specMode == MeasureSpec . AT_MOST ) { result = Math . min ( result , specSize ) ; } } return result ; }
determines the width of this view
