Call onClick() after ACTION_UP; invalidate view after setting background
This commit is contained in:
parent
f6a91b3acf
commit
b66f6c72c3
1 changed files with 4 additions and 3 deletions
|
@ -960,12 +960,13 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
int action = event.getAction();
|
int action = event.getAction();
|
||||||
if (action == MotionEvent.ACTION_DOWN) {
|
if (action == MotionEvent.ACTION_DOWN) {
|
||||||
v.setBackgroundColor(getResolvedColor(R.color.keyboard_item_bg_pressed));
|
v.setBackgroundColor(getResolvedColor(R.color.keyboard_item_bg_pressed));
|
||||||
if (listener != null) {
|
v.invalidate();
|
||||||
listener.onClick(v);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
setNormalBackground(v, controlButton);
|
setNormalBackground(v, controlButton);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onClick(v);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue