Respond to a scroll action
- Import the following classes:
- net.rim.device.api.ui.TouchEvent
- net.rim.device.api.ui.TouchGesture
- net.rim.device.api.ui.Field
- net.rim.device.api.ui.Manager
- net.rim.device.api.ui.Screen
- Create a class that extends the Manager class.
public class newManager extends Manager {
- In your implementation of the touchEvent(TouchEvent message) method, check if the value TouchEvent.getEvent() returns is equal to TouchEvent.MOVE.
protected boolean touchEvent(TouchEvent message) {
switch(message.getEvent()) {
case TouchEvent.MOVE:
return true;
}
return false;
}
Was this information helpful? Send us your comments.