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));
}

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 ) ) ; }
computes the manhattan - ish distance to the edge of the tab . this distance is good enough for click detection .
