I would like to be able to do a "push-to-activate" style interaction with the trackball. That is, I would like an event notification at the beginning and end of the push. At the moment, using the code below, I can only get an event when the trackball/pad is let go.
/**
* listen for clicks
*/
public boolean navigationClick(int status, int time)
{
System.out.println("click (" + status + "," + time + ")");
return super.navigationClick(status, time);
}
/**
* listen for movement
*/
public boolean navigationMovement(int dx, int dy, int status, int time)
{
System.out.println("move (" + dx + "," + dy + "," + status + "," + time + ")");
return super.navigationMovement(dx, dy, status, time);
}
Is there an event that fires when I first press a button?
The solution to this was that it was only ever a problem in the simulator.
It's now working on a physical device and the
navigationClick(..)
andnavigationUnclick(..)
methods do exactly what they claim. They're basically button down and button up events for the trackball/pad.