开发者

how to control trackwheel sensitivity in Blackberry

trackwheelRoll( int amount, int status, int time)

Is there a way to control the trackwheel sensitivity from this method?

开发者_C百科

Thanks.


If you're trying to lower it, you can set a lastMoveTime flag in your class. After that, in your trackwheelRoll() method you can compare the time to that and see if you should move. For example:

protected boolean trackwheelRoll(int amount, int status, int time) {
    if(time - lastMoveTime > someTimeThatYouDetermine) {
        lastMoveTime = time;
        return super.trackwheelRoll(amount, status, time);
    }
    return false;
}

You'll set someTimeThatYouDetermine to control how much lower the sensitivity is. What this does is essentially discard some of the motion so it feels slower to the user.

Alternatively, if you want to increase sensitivity, you can simply multiply amount by some number.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜