主权项 |
1. A touch-control method, comprising:
storing, by a terminal device, a sample library in a memory of the terminal device, wherein the sample library stores at least one sample, wherein the at least one sample comprises a sample observation area, a sample touch area, and sample interface information; obtaining, by the terminal device, user interface information, wherein the user interface information is used to indicate characteristics of a current interface of the terminal device or functions of interface elements in the current interface; receiving, by the terminal device, a touch instruction of a user; determining, by the terminal device, a user touch area corresponding to the touch instruction; determining, by the terminal device, whether a user observation area has an overlapping portion with the user touch area; and when the user observation area has an overlapping portion with the user touch area, responding by the terminal device, to the touch instruction of the user; when the user observation area does not have an overlapping portion with the user touch area, obtaining, by the terminal device, a target sample from the sample library, wherein a sample observation area of the target sample matches the user observation area, and sample interface information of the target sample matches the user interface information; determining, by the terminal device, whether the user touch area matches a sample touch area of the target sample; responding, by the terminal device, to the touch instruction, when the user touch area matches the sample touch area of the target sample; and skipping responding, by the terminal device, to the touch instruction when the user touch area does not match the sample touch area of the target sample. |