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.
精彩评论