This commit is contained in:
Alexey Kulish 2018-02-03 14:44:50 +03:00
parent 3de5811add
commit cd757e3516
2 changed files with 6 additions and 4 deletions

View file

@ -316,12 +316,9 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getY() <= menuTopViewHeight) {
if (!hasMoved && event.getY() <= menuTopViewHeight) {
if (singleTapDetector.onTouchEvent(event)) {
moving = false;
if (hasMoved) {
applyPosY(getViewY(), false, false, 0, 0, 0);
}
openMenuHalfScreen();
recycleVelocityTracker();
@ -383,6 +380,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
case MotionEvent.ACTION_UP:
if (moving) {
moving = false;
hasMoved = false;
int currentY = getViewY();
final VelocityTracker velocityTracker = this.velocityTracker;
@ -413,6 +411,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
break;
case MotionEvent.ACTION_CANCEL:
moving = false;
hasMoved = false;
recycleVelocityTracker();
break;

View file

@ -604,6 +604,9 @@ public class ContextMenuLayer extends OsmandMapLayer {
if (entry.getKey().startsWith("name:") && !entry.getValue().equals("")) {
names.add(entry.getValue());
}
if (entry.getKey().equals("name") && !entry.getValue().equals("")) {
names.add(entry.getValue());
}
}
LatLon searchLatLon = objectLatLon;
if (searchLatLon == null) {