Check action before call onClick()
This commit is contained in:
parent
b66f6c72c3
commit
f1fa303c44
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue