1. MotionEvent Functions
The following methods support multi-touch, that is, you can call the following methods for a single touch point.
1.1 getPressure ()
This api can be used to obtain the pressure when you touch the screen with your fingers, but hardware and driver support is required...
It helps us to make more materialized designs, such:
1. hand-drawn. You can better simulate the interest and color of the paint brush Based on the finger pressure to make people feel more real.
2. Click the control. You can set the pressed Effect of controls (such as buttons) based on the finger pressure, such as the concave amplitude.
3. New operation method. And the fingers do not leave the screen, by adjusting the finger pressure to achieve the operation purpose, such as simulating a car refueling door
1.2 getSize ()
Obtain the contact area between the finger and the screen when you touch the screen.
This can be used to identify fattouch events, that is, a large area of touch events, which may be due to user misoperations.
1.3 getToolType ()
Gets the type of the object that triggers the current event: Finger, touch pen, or mouse (touch Version)
I didn't expect any use of this...
2. ClipData
ClipData. addItem (ClipData. Item item)
This api can put the text, resource address, and Intent in a ClipData object and save it in the system clipboard. The system clipboard can transmit data across applications, therefore, the following functions are supported:
1. copy and paste various files (images and videos) across applications, similar to windows clipboard.
2. Because the resource address can be local or from the network, you can also copy resources on the network side directly, similar to youdao cloud note on the PC side, directly copy the content of the webpage to the local. ClipData itself supports formatting text with HTML tags ..
3. directly copy the shortcut of the application. Intent is equivalent to starting a shortcut of the interface. In theory, you can copy the shortcut that jumps to any interface of the application, such as calling someone, initiate a video chat with someone.
1.3 Vibrator
Vibrator. vibrate (long [] pattern, intrepeat)
This api can control the rhythm of the vibration motor and support the following functions:
1. Let the user customize the vibration rhythm, ios already has this function.
2. There are several built-in vibration rhythms, which work well with the bell sound to increase interest.