Check action before call onClick()

This commit is contained in:
alex 2018-02-21 13:49:24 +02:00
parent b66f6c72c3
commit f1fa303c44

View file

@ -962,10 +962,11 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
v.setBackgroundColor(getResolvedColor(R.color.keyboard_item_bg_pressed));
v.invalidate();
return true;
}
setNormalBackground(v, controlButton);
if (listener != null) {
listener.onClick(v);
} else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
setNormalBackground(v, controlButton);
if (listener != null) {
listener.onClick(v);
}
}
return false;
}