The Gesture API allows MIDlets to receive notifications when the
user interacts with Canvas
or CustomItem
elements. The API registers touch interaction as a series of gesture events.
You can combine the Gesture API with the Frame Animator API to create linear drag and kinetic scroll animations. You can also use gesture events together with traditional pointer events and multipoint touch events to implement more complex touch functionality.
The Gesture API consists of the following classes and interfaces (packaged as part of the Nokia UI API):
Use the GestureEvent
interface to retrieve information about a gesture
event. A GestureEvent
object returned by the platform
represents a single gesture event of a given type.
Use
the GestureInteractiveZone
class to define the touchable
screen area and which types of gesture events are received from this
area.
Use the GestureListener
interface to implement a listener for receiving
a notification whenever a gesture event occurs.
Use the GestureRegistrationManager
class to manage GestureInteractiveZones
and GestureListeners
.
The Gesture API is supported since Nokia UI API 1.1b.
The Gesture API is supported since Series 40 6th Edition FP1.
To implement touch functionality in your MIDlet:
For more information about the Gesture API classes and methods, see the Gesture API reference.