protected int measureWidth(int measureSpec){
  int specMode=MeasureSpec.getMode(measureSpec);
  int specSize=MeasureSpec.getSize(measureSpec);
  int result;
  if (specMode == MeasureSpec.EXACTLY) {
    result=specSize;
  }
 else {
    result=(int)(2 * radius) + getPaddingLeft() + getPaddingRight()+ (int)(2 * strokeWidth);
    if (specMode == MeasureSpec.AT_MOST) {
      result=Math.min(result,specSize);
    }
  }
  return result;
}

protected int measureWidth ( int measureSpec ) { int specMode = MeasureSpec . getMode ( measureSpec ) ; int specSize = MeasureSpec . getSize ( measureSpec ) ; int result ; if ( specMode == MeasureSpec . EXACTLY ) { result = specSize ; } else { result = ( int ) ( 2 * radius ) + getPaddingLeft ( ) + getPaddingRight ( ) + ( int ) ( 2 * strokeWidth ) ; if ( specMode == MeasureSpec . AT_MOST ) { result = Math . min ( result , specSize ) ; } } return result ; }
measures width according to the passed measure spec
