Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 shows a flowchart of an implementation of the interface response method provided by the embodiment of the present invention, which is detailed as follows:
in step S101, when N click events are received, the click event types supported by the click areas corresponding to the N click events are determined, where N is an integer greater than 1.
It should be noted that the execution subject of the embodiment of the present invention may be a mobile terminal, or may be other computer equipment, which is not limited herein. Mobile terminals may include mobile telephones (or so-called "cellular" telephones) and computers with mobile terminals, such as portable, pocket, hand-held, computer-included, or vehicle-mounted mobile devices, that exchange language and/or data with a radio access network. For example, the devices include, but are not limited to, Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistants (PDAs).
In an embodiment of the present invention, a single click or a long press generates a click event. A double click generates two click events, and so on. Here, the click event may be generated by a touch operation or a key operation, and is not limited herein. The type of click event supported by each click zone may be different. For example, a click zone may support only a single click, or may support both single and double clicks. Here, it is assumed that the click event type supported by the first click region is single click, and the click event type supported by the second click region is single click and double click.
In step S102, M click events in the N click events are retained according to the click event type, and the M click events are responded, where M is an integer greater than or equal to 1 and less than or equal to N.
If the click area determined according to the N click events is the first click area and the click event type supported by the first click area is click, one click event in the N click events is reserved, and the click event is responded, namely the click event is responded.
If the click area determined according to the N click events is a second click area and the click event types supported by the second click area are click and double click, two click events in the N click events are reserved and responded, namely the double click event is responded.
Optionally, when the N click events correspond to the same click region, the reserving M click events of the N click events according to the click event type specifically includes:
and reserving M click events with the previous occurrence time in the N click events according to the click event types.
If the click areas determined according to the N click events are all the first click areas, reserving the first click event in the N click events, and responding to the click event, namely responding to the click event.
If the click areas determined according to the N click events are the second click areas, reserving the first two click events in the N click events, and responding to the two click events, namely responding to the double click event.
Optionally, when the N click events correspond to at least two click regions, the reserving M click events of the N click events according to the click event type specifically includes:
and reserving M click events with later occurrence time in the N click events according to the click event types.
If the click area determined according to the N click events comprises the first click area and the second click area, and the click area corresponding to the last click event in the N click events is the first click area, the last click event in the N click events is reserved, and the click event is responded, namely the click event is responded.
If the click areas determined according to the N click events comprise both a first click area and a second click area, and the click areas corresponding to the last two click events in the N click events are both the second click area, retaining the last two click events in the N click events, and responding to the two click events, namely responding to the double click event.
If the click area determined according to the N click events comprises a first click area and a second click area, the click area corresponding to the last click event in the N click events is the second click area, and the click area corresponding to the penultimate click event in the N click events is the first click area, the last click event in the N click events is reserved, and the click event is responded, namely the click event is responded.
Fig. 2 shows a flowchart of a specific implementation of step S101 of the interface response method provided in the embodiment of the present invention, and fig. 2 is a flowchart of:
when receiving N click events, determining the click event types supported by the click areas corresponding to the N click events includes:
in step S201, when N click events are received, coordinate information of the N click events is acquired;
in step S202, determining a click area corresponding to the N click events according to the coordinate information of the N click events;
in step S203, a click event type supported by the application icon or the interface corresponding to the click area is determined.
In the embodiment of the invention, when the click event is generated by the touch operation, the click area corresponding to the click operation is determined according to the coordinate information of the click event. Each touch operation corresponds to one piece of coordinate information, that is, each click event corresponds to one piece of coordinate information.
Further, after the retaining M of the N click events according to the click event type, the method further includes:
discarding N-M click events of the N click events except the M click events.
In the embodiment of the invention, M click events in the N click events are kept, and other N-M click events are discarded, so that multiple jumps of the interface caused by continuous responses of the click events are avoided.
It should be understood that, in the embodiment of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
According to the embodiment of the invention, when N click events are received, the click event type supported by the click area is determined, M click events in the N click events are reserved according to the click event type, and the reserved M click events are responded, so that when the number of the received click events exceeds the click times supported by the interface or the system is in pause, the interface is prevented from jumping for many times, and the expected interface response of a user is realized.
Fig. 3 is a block diagram illustrating an interface response apparatus according to an embodiment of the present invention, which may be used to execute the interface response method shown in fig. 1 or fig. 2. For convenience of explanation, only portions related to the embodiments of the present invention are shown.
Referring to fig. 3, the apparatus includes:
the click event type determining unit 31 is configured to determine, when N click events are received, a click event type supported by a click area corresponding to the N click events, where N is an integer greater than 1;
and the interface response unit 32 is configured to reserve M click events of the N click events according to the click event type, and respond to the M click events, where M is an integer greater than or equal to 1 and less than or equal to N.
Preferably, the click event type determination unit 31 includes:
a coordinate information obtaining subunit 311, configured to, when N click events are received, obtain coordinate information of the N click events;
a click region determining subunit 312, configured to determine, according to the coordinate information of the N click events, click regions corresponding to the N click events;
and the click event type determining subunit 313 is configured to determine a click event type supported by the application icon or the interface corresponding to the click area.
Optionally, the interface response unit 32 is specifically configured to:
and when the N clicking events correspond to the same clicking area, reserving M clicking events with the previous occurrence time in the N clicking events according to the types of the clicking events, and responding to the M clicking events.
Optionally, the interface response unit 32 is specifically configured to:
when the N clicking events correspond to at least two clicking areas, reserving M clicking events with later occurrence time in the N clicking events according to the types of the clicking events, and responding to the M clicking events.
Further, the interface response unit 32 is further configured to:
discarding N-M click events of the N click events except the M click events.
According to the embodiment of the invention, when N click events are received, the click event type supported by the click area is determined, M click events in the N click events are reserved according to the click event type, and the reserved M click events are responded, so that when the number of the received click events exceeds the click times supported by the interface or the system is in pause, the interface is prevented from jumping for many times, and the expected interface response of a user is realized.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the units may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.