Detect Multitouch Gestures

For this project, we’ll implement the most common user interactions using just one simple geometric primitive—a rectangle—drawn on the screen using Processing’s rect(x, y, width, height) method.[53] To begin, we’ll place a rectangle in a specified size of 100 pixels in the center of the screen. Then we use a series of KetaiGesture callback events to trigger changes to the rectangle, including a change of scale, rotation, color, and position, as illustrated in Figure 5, Using multitouch gestures.

images/Display/DisplayGestureFinger.png
Figure 5. Using multitouch gestures. A rectangle scaled with a two-finger pinch gesture, turned by a two-finger rotation ...

Get Rapid Android Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.