You should be able to use Rect.intersects(Rect, Rect)
, like this example:
Rect myViewRect = new Rect();
myView.getHitRect(myViewRect);
Rect otherViewRect1 = new Rect();
otherView1.getHitRect(otherViewRect1);
Rect otherViewRect2 = new Rect();
otherView2.getHitRect(otherViewRect2);
if (Rect.intersects(myViewRect, otherViewRect1)) {
// Intersects otherView1
}
if (Rect.intersects(myViewRect, otherViewRect2)) {
// Intersects otherView2
}
Reference is here.