question: private int binarySearch ( final int start , final int end , final SizeTester sizeTester , final RectF availableSpace ) { int lastBest = start ; int low = start ; int high = end - 1 ; int middle ; while ( low <= high ) { middle = low + high > > > 1 ; final int midValCmp = sizeTester . onTestSize ( middle , availableSpace ) ; if ( midValCmp < 0 ) { lastBest = low ; low = middle + 1 ; } else if ( midValCmp > 0 ) { high = middle - 1 ; lastBest = high ; } else return middle ; } return lastBest ; }
target:  Calculates best text size for current EditText size