1. What is a touch event?
Currently, you can directly check Wikipedia and other professional documents. However, here is a popular example.
First, let's take a look at the following picture. Click the picture in the middle and the words "Click image" will pop up.
2. What do users understand?
From the user's perspective, the entire process is analyzed as follows:
1. There is a mobile phone in your hand. The screen displayed on the mobile phone is an image in the middle of a black background.
2. Click an image on the screen with your finger
3. The words "Click image" are displayed.
3. What do mobile phone systems do? What about the process from the perspective of the mobile phone system?
1. display the current interface (this is in the UI category and is skipped for the time being)
2. users' fingers clicked on the screen.
3. The bottom layer only provides the actions and coordinates obtained in the MotionEvent to the FrameWork layer.
4. Click events in the user-clicked View
4. Question 2:
1. After the Andorid system obtains the touch event, how does one know which view the user is touching?
2. Does the Android system know what you want to do? For example, click, scroll, long press, or others?
5. Explain the above 2nd questions in sequence, because the view must be first found based on the guess, and then the view is specified for corresponding processing. The event Learning Series is going to learn from bottom to bottom. Let's take a look at the second question. How does the system know what users want? (What is a user's gesture? Click, scroll, long press, or others ?), The following six articles explain the second question about a touch event (solution: What do users want to do with this touch screen ?).
Andorid Touch event Learning 1 Click Event
Android Touch event Learning 2 where click events are triggered
Android Touch event Learning 3 basic knowledge of distinguishing various gestures
Android Touch event Learning 4 getting a finger Touch position
Android Touch event Learning 5 Click and long press principle
Android Touch event Learning 6 Gesture Recognition
The above six articles are related to View. onTouchEvent and its MotionEvent parameter.
Some other knowledge points have not been summarized, such as custom gestures and multi-point touch.
6. Explain the 1st questions.
The following article explains how Android knows which view to pass the event?
In Android Touch event Learning 7, which view is used to process events?
Android Touch event Learning 8 principle of event Distribution