question: public float computeDistanceTo ( float x , float y ) { final RectF bounds = getClickTargetBounds ( ) ; float dx = Math . max ( bounds . left - x , x - bounds . right ) ; float dy = Math . max ( bounds . top - y , y - bounds . bottom ) ; return Math . max ( 0.0f , Math . max ( dx , dy ) ) ; }
target:  Computes the Manhattan-ish distance to the edge of the tab. This distance is good enough for click detection.