tags:

views:

420

answers:

1

Hi Everyone,

I want to capture onClick events for the trackball on a HTC Hero. This event is firing and I can get the direction of motion of the trackball:

@Override
public boolean onTrackballEvent(MotionEvent event) {

}

How do I find out if the event was a click event?

+2  A: 

Try overriding onKeyDown(), watching for the KeyEvent.KEYCODE_DPAD_CENTER event.

CommonsWare
Good man, thanks very much for the help!
Gaz