开发者

Android onTrackballEvent and Click

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(MotionEv开发者_如何学运维ent event) {

}

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜