I'm implementing an app that has a MapField
, which I am extending.
I'm using navigationMovement(int dx, int dy, int status, int time)
to move around this map (besides touchEvent(TouchEvent event)
which i dont have a problem with).
The problem is that I want to do something when the user stops moving using the trackwheel
, but I can't find a listener
for this like the TouchEvent.UP
for example.
Does anyone have an idea of what I can use to detect this?
Thanks in advance!
I'm not (yet) that familiar with BlackBerry-programming, but I don't remember seeing a listener for that anywhere.
One way I could think of to accomplish this could be to create a TimerTask, and store a timestamp in some class-variable when the TrackWheel moves (when your navigationMovement is called). Then in the navigationMovement, set the timestamp when the movement occurred (from the time-parameter passed to the method), and start a TimerTask which would then check after a while if the timestamp is marked a certain amount of time back (the wheel has not moved since), and if so, you know the trackwheel has stopped.