Contents |
When touch screen is tapped with finger it may generate lots of unnecessary noice (drag events) and also "pointer up" event might easily end up being too far away from "pointer down" coordinates. Many applications rely on "pointer up" and "pointer down" to occure within certain area in order to launch some functionality(e.g. selecting small links in Internet Browser). A new feature called TapDetectionHelper offers help for detecting taps in Canvas based Java applications.
As a result finger touch events on small areas are detected more reliably. Note, that using TapDetectionHelper might make usability worse in painting or drawing applications. For such applications it is possible to disable the feature, as shown below.
It is possible to use JAD attribute "Nokia-MIDlet-Tap-Detection-Options" to alter the predefined suppressor values (i.e. 200twips, 500ms). Twip value is the distance from "pointer down" coordinates and rectangle can be calculated by multiplying this value with two. (1 twip = 1/1440 of an inch)
Nokia-MIDlet-Tap-Detection-Options:0,0 <- Disable the feature, All drag events will be passed to the MIDlet. No up-event coordinate switching will be done.
Nokia-MIDlet-Tap-Detection-Options:200,500 <- Same as default values. Rectangle size 400x400 twips (about 7mmx7mm). Timeout 500ms.
Nokia-MIDlet-Tap-Detection-Options:100,250 <- Rectangle size 200x200 twips. Timeout 250ms.
Picture 1. Link selection situation in Opera Mini Browser. The screen has been touched on the red dot. Rectange illustrates the safe area within where all drag events will be suppressed for 500ms. If "pointer up" occurs within red rectange and within 500ms, it's coordinates will be set the same as "pointer down" coordinates. As a result accurate tapping/selecting small link has been made easier by TapDetectionHelper.
Picture 2. Default rectangle dimensions and JAD parameter twip usage.
No related wiki articles found