Touch screen interaction models
BlackBerry® devices with a touch screen and a trackpad use a forceless click interaction model, where a BlackBerry device user taps the screen or uses the trackpad to perform an action. This model differs from BlackBerry devices with a SurePress™ touch screen, where the user clicks (or presses) the screen to perform an action.
On both types of devices, when the user touches the screen, a TouchEvent.DOWN event occurs.
On devices with a SurePress touch screen, when the user applies pressure and clicks the screen, a TouchEvent.CLICK event occurs. When the pressure is lessened, a TouchEvent.UNCLICK event occurs. Typically, actions (such as invoking an action based on a button) occur on the TouchEvent.UNCLICK event. When the user releases the screen completely, a TouchEvent.UP event occurs.
On devices with a touch screen that supports forceless clicks, there is no physical clicking and unclicking. Instead, actions are expected to occur when the user taps the screen. A tap is a TouchEvent.DOWN event followed quickly by a TouchEvent.UP event. This combination of touch events is referred to as a gesture, and therefore a TouchGesture occurs. In the case of a tap, a TouchGesture.TAP event occurs (along with the TouchEvent.DOWN and TouchEvent.UP event).
For greater compatibility between the two types of touch screen interaction models, on devices that support forceless clicks, the TouchEvent.CLICK event and TouchEvent.UNCLICK event occur after the TouchGesture.TAP event, so you can invoke an action on the TouchEvent.UNCLICK event on all touch screen devices, whether the device has a SurePress touch screen or not.
|
User action |
Devices that support a forceless click |
Devices with a SurePress touch screen |
|---|---|---|
|
Touch the screen. |
TouchEvent.DOWN |
TouchEvent.DOWN |
|
Touch and hold a finger on an item. |
TouchGesture.HOVER |
TouchGesture.HOVER |
|
Click the screen. |
— |
TouchEvent.CLICK |
|
Click and hold the screen. |
— |
TouchEvent.CLICK_REPEAT |
|
Release the screen. |
— |
TouchEvent.UNCLICK |
|
Remove a finger from the screen. |
TouchEvent.UP |
TouchEvent.UP |
|
Tap the screen. |
TouchEvent.DOWN TouchGesture.TAP TouchEvent.CLICK TouchEvent.UNCLICK TouchEvent.UP |
TouchEvent.DOWN TouchGesture.TAP TouchEvent.UP |
You can determine whether a device with a touch screen supports forceless clicks by invoking DeviceCapability.isTouchClickSupported(). If the device supports forceless clicks, the method returns false. If the device has a SurePress touch screen, the method returns true.