开发者

How do I use the TrackBall API in Blackberry?

开发者 https://www.devze.com 2023-02-06 20:12 出处:网络
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 pr

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

精彩评论

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