how do you detect a long click on a track pad please? I.e. on this thingy:
I can detect a short click with:
public boolean navigationClick(int status, int time) {
// XXX
return super.navigationClick(status, time);
}
And also I can detect a long click on a touch screen with:
protected boolean touchEvent(TouchEvent event) {
if (event.getEvent() == TouchEvent.GESTURE) {
TouchGesture gesture = event.getGesture();
if (gesture.getEvent() == TouchGesture.HOVER) {
// XXX
return true;
}
}
return super.touchEvent(event);
}
But I just can't find how to detect the long click on a track pad (I'd like to show a popup menu in that case)...
Thank you! Alex
I would play with
trackwheelClick(int status, int time)
andtrackwheelUnclick(int status, int time)
to determine click length. You'll have to set flags here and there (probably innavigationClick()
as well) to not fire normal click events prematurely. Beyond that, I don't know of a LONG_CLICK flag or anything.