static int [ ] getMeasurementsForFixedMode ( Context context , int screenWidth , int noOfTabs , boolean scrollable ) { int [ ] result = new int [ 2 ] ; int minWidth = ( int ) context . getResources ( ) . getDimension ( R . dimen . fixed_min_width_small_views ) ; int maxWidth = ( int ) context . getResources ( ) . getDimension ( R . dimen . fixed_min_width ) ; int itemWidth = screenWidth / noOfTabs ; if ( itemWidth < minWidth && scrollable ) { itemWidth = ( int ) context . getResources ( ) . getDimension ( R . dimen . fixed_min_width ) ; } else if ( itemWidth > maxWidth ) { itemWidth = maxWidth ; } result [ 0 ] = itemWidth ; return result ; }
Used to get Measurements for MODE_FIXED