开发者

Android onTrackballEvent and Click

开发者 https://www.devze.com 2022-12-26 08:37 出处:网络
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:

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

精彩评论

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