question: protected int onMeasureDimension ( int min , int measureSpec ) { switch ( MeasureSpec . getMode ( measureSpec ) ) { case MeasureSpec . EXACTLY : return MeasureSpec . getSize ( measureSpec ) ; case MeasureSpec . AT_MOST : return Math . min ( min , MeasureSpec . getSize ( measureSpec ) ) ; case MeasureSpec . UNSPECIFIED : default : return min ; } }
target:  Calculates the measured dimension in a single direction (width or height).