开发者

How do I use the TrackBall API in Blackberry?

I want to scroll up and down in a custo开发者_StackOverflowm menu I have made using the trackball, but how do I receive and filter the trackball events? (I know how to process keyboard events using protected boolean keyChar(char key, int status, int time).)


Your best bet is to use the navigationClick, navigationMovement and navigationUnclick methods in Field:

http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/Screen.html#navigationMovement%28int,%20int,%20int,%20int%29

Or if you want to get the events before any of the fields do, override the same methods on the top-level Screen.

RIM strongly discourages the use of the old trackwheel API. Navigation is the way to go.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜