Hi,
I hava a MapView and I define a Rect. Touching the map I compare the coordinates to detect whether the rect is touched or not. But it does not work
RectF hitTestRecr = new RectF();
hitTestRecr.set(0,100,0,100);
hitTestRecr.offset(0,0);
if (hitTestRecr.contains(event.getX(),event.getY())) {
Toast.makeText(getBaseContext(), "hit", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getBaseContext(), "no hit", Toast.LENGTH_SHORT).show();
}
I always get no hit
any ideas?