List processing method, device, equipment and storage medium

By obtaining and converting sliding operation information, combining the screen and control coordinate system, accurately calculate the sliding distance and control the sliding effect, the problem of inconsistent distance when sliding the list of terminal devices is solved, and the user experience is improved.

CN111857486BActive Publication Date: 2024-11-26BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910334826.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-24
Publication Date
2024-11-26
Estimated Expiration
2039-04-24

AI Technical Summary

Technical Problem

In the prior art, when the terminal device slides the list, due to the impact of the collapse or expansion of the header area, the calculated sliding distance does not match the user's expectations, resulting in the list being unable to slide to the desired position of the user, and the user experience is poor.

Method used

By obtaining the position information and sliding time of the initial touch point and the end touch point during the user's sliding operation, combining the conversion of the screen coordinate system and the control coordinate system, the sliding distance of the list is accurately calculated, and the speed is decelerated according to the instantaneous speed and preset speed are decelerated according to the instantaneous speed and preset speed. Control the sliding effect to ensure that the list slides to the user's expected position.

Benefits of technology

The accuracy of sliding distance is matched with user expectations, the sliding effect of the list is optimized, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111857486B_ABST
    Figure CN111857486B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for processing a list, wherein the method includes: obtaining sliding operation information when a user performs a sliding operation, the sliding operation information includes first position information, second position information and sliding time, the first position information is the position information of the initial touch point, the second position information is the position information of the termination touch point, the first position information and the second position information are both position information obtained using the first coordinate system as the coordinate system, and the first coordinate system is the coordinate system where the screen of the terminal device is located; according to the sliding operation information, determining the sliding distance of the list displayed by the terminal device; sliding the list according to the sliding distance. The sliding distance of the list can be determined more accurately, the calculated sliding distance is consistent with the user's expectations, and the list can be slid to the position desired by the user; the sliding effect of the list can be optimized to enhance the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to terminal technology, and in particular to a list processing method, device, equipment and storage medium. Background Art

[0002] With the development of terminal devices, terminal devices are widely used in people's lives and work. Various applications can be installed in the terminal device, and the application can display a list with displayed content. Among them, the list has a control, and the terminal device displays the content in the control. The user can slide the list displayed by the terminal device by touching the screen of the terminal device.

[0003] In the prior art, a terminal device displays a list; when a user touches the screen of the terminal device to perform a sliding operation, the user's finger will press, move, and lift on the screen of the terminal device; the terminal device can obtain the position information of the touch point of the sliding operation; the position information obtained by the terminal device is relative to the control corresponding to the touch point, for example, the position information of the initial touch point is relative to the control where the initial touch point is located; then, the terminal device determines the distance that the list needs to slide based on the position information of the touch point of the sliding operation; then, the terminal device slides the list.

[0004] However, in the prior art, when a terminal device displays a list, a header area is set at the top of the list, that is, the terminal device displays the header area and the list; the header area can be collapsed or expanded. When calculating the distance that the list needs to slide after the sliding operation, the position information used by the terminal device is relative to the control where the touch point is located, and the collapse or expansion of the header area will affect the correct determination of the sliding distance of the list. There is a gap between the sliding distance calculated by the terminal device based on such position information and the user's expectations, resulting in the list not being able to slide to the position desired by the user, and a poor user experience. Summary of the invention

[0005] The present application provides a list processing method, apparatus, device and storage medium, which are used to solve the problem that the sliding distance of the list calculated by the terminal device is not consistent with the user's expectation, resulting in the list being unable to slide to the position desired by the user.

[0006] In a first aspect, the present application provides a method for processing a list, which is applied to a terminal device, wherein the terminal device is used to display a list, and the method includes:

[0007] Obtaining sliding operation information when a user performs a sliding operation, wherein the sliding operation information includes first position information, second position information, and sliding time, wherein the first position information is position information of an initial touch point during the sliding operation, the second position information is position information of an end touch point during the sliding operation, the sliding time is the time it takes for the sliding operation to slide from the initial touch point to the end touch point, and both the first position information and the second position information are position information obtained using a first coordinate system as a coordinate system, and the first coordinate system is a coordinate system where the screen of the terminal device is located;

[0008] Determining a sliding distance of the list displayed by the terminal device according to the sliding operation information;

[0009] Slide the list according to the sliding distance.

[0010] Furthermore, the obtaining of sliding operation information when the user performs a sliding operation includes:

[0011] Acquire third position information corresponding to the initial touch point, fourth position information corresponding to the end touch point, and the sliding time when the user performs the sliding operation, wherein the third position information is position information obtained by taking the second coordinate system as the coordinate system, the second coordinate system is the coordinate system where the first control where the initial touch point is located is located, the fourth position information is position information obtained by taking the third coordinate system as the coordinate system, the third coordinate system is the coordinate system where the second control where the end touch point is located is located, and the first control and the second control are located in the list;

[0012] The first coordinate system is used as a reference coordinate system, the third position information is converted into the first position information, and the fourth position information is converted into the second position information.

[0013] Further, using the first coordinate system as a reference coordinate system, converting the third position information into the first position information, and converting the fourth position information into the second position information, includes:

[0014] Convert the value represented by the third position information to a zero value to obtain a first intermediate value, and convert the value represented by the fourth position information to a zero value to obtain a second intermediate value;

[0015] According to the first coordinate system as a reference coordinate system, the first intermediate value is converted into the first position information, and the second intermediate value is converted into the second position information.

[0016] Further, determining the sliding distance of the list displayed by the terminal device according to the sliding operation information includes:

[0017] determining a moving distance according to the first position information and the second position information;

[0018] Determining an instantaneous speed corresponding to the list according to the moving distance and the sliding time;

[0019] A sliding distance of the list is determined according to the instantaneous speed and a preset deceleration.

[0020] Further, sliding the list according to the sliding distance includes:

[0021] Determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration;

[0022] The list is controlled to slide the sliding distance within the stop time period at the sliding speed at each moment.

[0023] Furthermore, the method further comprises:

[0024] Get the user's click operation instructions;

[0025] According to the click operation instruction, the list is controlled to stop sliding.

[0026] In a second aspect, the present application provides a terminal device, the terminal device being used to display a list, the terminal device comprising:

[0027] a first acquisition unit, configured to acquire sliding operation information when a user performs a sliding operation, wherein the sliding operation information includes first position information, second position information, and sliding time, wherein the first position information is position information of an initial touch point during the sliding operation, the second position information is position information of an end touch point during the sliding operation, the sliding time is the time taken for the sliding operation to slide from the initial touch point to the end touch point, and both the first position information and the second position information are position information obtained using a first coordinate system as a coordinate system, and the first coordinate system is a coordinate system where the screen of the terminal device is located;

[0028] a determining unit, configured to determine a sliding distance of the list displayed by the terminal device according to the sliding operation information;

[0029] The sliding unit is used to slide the list according to the sliding distance.

[0030] Furthermore, the first acquisition unit includes:

[0031] an acquisition module, used for acquiring third position information corresponding to the initial touch point, fourth position information corresponding to the termination touch point, and the sliding time when the user performs the sliding operation, wherein the third position information is position information obtained by taking the second coordinate system as the coordinate system, the second coordinate system is the coordinate system where the first control where the initial touch point is located is located, the fourth position information is position information obtained by taking the third coordinate system as the coordinate system, the third coordinate system is the coordinate system where the second control where the termination touch point is located is located, and the first control and the second control are located in the list;

[0032] A conversion module is used to convert the third position information into the first position information and convert the fourth position information into the second position information using the first coordinate system as a reference coordinate system.

[0033] Furthermore, the conversion module includes:

[0034] A first conversion submodule, configured to convert the value represented by the third position information into a zero value to obtain a first intermediate value, and convert the value represented by the fourth position information into a zero value to obtain a second intermediate value;

[0035] A second conversion submodule is configured to convert the first intermediate value into the first position information and convert the second intermediate value into the second position information based on the first coordinate system as a reference coordinate system.

[0036] Furthermore, the determining unit includes:

[0037] A first determining module, configured to determine a moving distance according to the first location information and the second location information;

[0038] A second determination module, configured to determine an instantaneous speed corresponding to the list according to the moving distance and the sliding time;

[0039] The third determination module is used to determine the sliding distance of the list according to the instantaneous speed and the preset deceleration.

[0040] Furthermore, the sliding unit comprises:

[0041] A fourth determination module, used to determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration;

[0042] The sliding module is used to control the list to slide the sliding distance within the stop time period at the sliding speed at each moment.

[0043] Furthermore, the terminal device further includes:

[0044] A second acquisition unit is used to acquire a click operation instruction of the user;

[0045] The stop module is used to control the list to stop sliding according to the click operation instruction.

[0046] In a third aspect, the present application provides a terminal device, comprising a unit or means for executing each step of any method of the first aspect above.

[0047] In a fourth aspect, the present application provides a terminal device, comprising a processor, a memory, and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement any method of the first aspect.

[0048] In a fifth aspect, the present application provides a terminal device comprising at least one processing element or chip for executing any method of the above first aspect.

[0049] In a sixth aspect, the present application provides a computer program, which, when executed by a processor, is used to execute any one of the methods of the first aspect above.

[0050] In a seventh aspect, the present application provides a computer-readable storage medium on which the computer program of the sixth aspect is stored.

[0051] The list processing method, apparatus, device and storage medium provided in the present application, when a user slides the list displayed on the screen of a terminal device, the terminal device determines the distance the list needs to slide after the sliding operation based on the relative position information between the initial touch point of the sliding operation and the screen, and the relative position information between the terminal touch point of the sliding operation and the screen; the relative position information between the touch point and the control is no longer used to determine the sliding distance; the problem of inaccurate calculated sliding distance is avoided; the sliding distance of the list can be determined more accurately, the calculated sliding distance is consistent with the user's expectations, and the list can be slid to the position desired by the user; the sliding effect of the list can be optimized to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0053] Figure 1 A schematic diagram of a list provided in an embodiment of the present application Figure 1 ;

[0054] Figure 2 A flowchart of a list processing method provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of a list provided in an embodiment of the present application Figure 2 ;

[0056] Figure 4 A schematic diagram of a list provided in an embodiment of the present application Figure 3 ;

[0057] Figure 5 A flowchart of another list processing method provided in an embodiment of the present application;

[0058] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0059] Figure 7 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application;

[0060] Figure 8 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application.

[0061] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0062] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0063] The embodiments of the present application can be applied to the Android system of a terminal device, can also be applied to the IOS system of a terminal device, and can also be applied to any operating system that may appear now or in the future.

[0064] It should be pointed out that the nouns or terms involved in the embodiments of the present application can refer to each other and will not be repeated here.

[0065] The specific application scenario of this application is: various applications can be installed in the terminal device, and the application can display a list with displayed content. Specifically, the terminal device provides a header area and a container on the display interface of the application, wherein the number of header areas is one or more; each header area is used to display content; the container includes multiple controls, each of which is used to display content, so that the container constitutes a list; optionally, the container may also include one or more parent containers, each of which includes multiple controls, each of which is used to display content.

[0066] Figure 1 A schematic diagram of a list provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the terminal device provides two header areas on the display interface, one header area is used to display advertisements, and the other header area is used to display selection icons of "comprehensive sorting", "sales sorting", "price sorting", and "filtering"; a list is provided, and the list is a container with multiple controls in the container, each control is used to display content, for example, the content on control 1, the content on control 2, the content on control 3, and the content on control 4 are currently displayed.

[0067] The header area can be folded, expanded, and fixed to the ceiling; when the user slides the list upward, the header area will be folded, and then the list will move upward. When the header area leaves, the list will scroll again; when the user slides the list downward, the header area will expand, and then the list will move downward, and then the list will scroll again. When the order is close to the container, the remaining header area will be expanded.

[0068] In the prior art, when a user touches the screen of a terminal device to perform a sliding operation, the user's finger will press, move, and lift on the screen of the terminal device; the terminal device can obtain the position information of the touch point of the sliding operation; the position information obtained by the terminal device is relative to the control corresponding to the touch point, for example, the position information of the initial touch point is relative to the control where the initial touch point is located; then the terminal device determines the distance that the list needs to slide based on the position information of the touch point of the sliding operation; then, the terminal device slides the list. However, when calculating the distance that the list needs to slide after the sliding operation, the position information used by the terminal device is relative to the control where the touch point is located, and the folding or unfolding of the header area will affect the correct determination of the sliding distance of the list. There is a gap between the sliding distance calculated by the terminal device based on such position information and the user's expectations, resulting in the list being unable to slide to the position desired by the user, and the user experience is poor.

[0069] The list processing method, device, equipment and storage medium provided in this application are intended to solve the above technical problems in the prior art.

[0070] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0071] Figure 2 The following is a flowchart of a method for processing a list provided in an embodiment of the present application. Figure 1 As shown, the method includes:

[0072] 101. Obtain sliding operation information when a user performs a sliding operation, wherein the sliding operation information includes first position information, second position information and sliding time, wherein the first position information is the position information of an initial touch point during the sliding operation, the second position information is the position information of an end touch point during the sliding operation, and the sliding time is the time for the sliding operation to slide from the initial touch point to the end touch point. Both the first position information and the second position information are position information obtained using a first coordinate system as a coordinate system, and the first coordinate system is a coordinate system where the screen of the terminal device is located.

[0073] In this embodiment, the execution subject of this embodiment may be a terminal device, or a server, or a list processing device or device, or other devices or equipment that can execute the method of this embodiment. This embodiment is described with the execution subject being a terminal device.

[0074] The terminal device provides a header area and a container on the display interface of the application, wherein the number of header areas is one or more; each header area is used to display content; the container includes multiple controls, each of which is used to display content; optionally, the container may also include one or more parent containers, each of which includes multiple controls, each of which is used to display content; the containers form a list. The control may be a RecyclerView control. Optionally, when the user touches or slides the header area, the list cannot be triggered to scroll.

[0075] The terminal device displays a list; when the user touches the screen of the terminal device to perform a sliding operation, the user's finger will go through the following actions on the screen of the terminal device: pressing (down), moving (move), and lifting (up); at each moment of this sliding operation, the terminal device will generate an event object, which can be called a sliding event (MotionEvent), and the event object includes the following behaviors: pressing and moving, or pressing and lifting.

[0076] For example, Figure 3 A schematic diagram of a list provided in an embodiment of the present application Figure 2 ,like Figure 3 As shown, the terminal device provides two header areas on the display interface, one header area is used to display advertisements, and the other header area is used to display selection icons of "comprehensive sorting", "sales sorting", "price sorting", and "filtering"; a list is provided, and the list is a container with multiple controls in the container, each control is used to display content, for example, the content on control 1, the content on control 2, the content on control 3, and the content on control 4 are currently displayed. The user touches point A on the screen of the terminal device, and the user performs a pressing operation at point A; the user's finger slides upward on the screen, and the finger passes through point B on the screen, wherein the "upward" direction in "slide up" in this application is the top of the list, and the "downward" direction in "slide down" in this application is the bottom of the list; then, the user's finger stops sliding at point C on the screen, and the user's finger is lifted, and the user performs a lifting operation at point C; the user's finger moves between point A and point C.

[0077] The header area displayed on the terminal device can be collapsed or expanded; when the user slides the list upward, the header area will be collapsed, then the list will move upward, and then the list will scroll; when the user slides the list downward, the header area will be expanded, then the list will move downward, and then the list will scroll, and when the order is close to the container, the remaining header area will be expanded.

[0078] After the user completes the lifting operation, the user completes a sliding operation; then, the terminal device needs to determine the distance that the list needs to slide.

[0079] If the solution in the prior art is adopted, the terminal device obtains the initial position information and the end position information of the sliding operation; wherein the initial position information is the position information of the initial touch point, and the end position information is the position information of the termination touch point; the position obtained by the terminal device uses the coordinate system of the control corresponding to the touch point as the coordinate system; for example, the initial touch point is located on a certain control, and a coordinate system is established with a certain point on the control as the origin, and the terminal device obtains the position information of the initial touch point on the coordinate system, and uses the position information as the initial position information, and the end position is also determined in this way; then, the terminal device calculates the distance that the list needs to slide based on the initial position information and the end position information of the sliding operation; then, the terminal device slides the list. In this way, since the header area will be folded or expanded first during the sliding process of the list, the movement of the header area will affect the sliding distance of the list.

[0080] For example, when the terminal device displays the header area and the list, the user slides the list upward; first, the header area will be collapsed, at which time, the container will move upward as a whole, that is, the list will move upward as a whole; then, the controls in the container will scroll in the container, that is, the list will scroll again; the terminal device uses the position information relative to the controls to determine the sliding distance of the list; for example, referring to Figure 3 As shown, point A is the initial position of the sliding operation, point A is located on control 3, and a coordinate system a is established with the upper left corner of control 3 as the origin. The terminal device obtains the position information of point A in the coordinate system a, and the terminal device uses the position information of point A in the coordinate system a as the initial position. Point C is the end position of the sliding operation, point C is located on control 1, and a coordinate system c is established with the upper left corner of control 1 as the origin. The terminal device obtains the position information of point C in the coordinate system c, and the terminal device uses the position information of point C in the coordinate system c as the end position information. During this sliding operation, the header will be collapsed first, causing the list to move upward based on the screen of the terminal device, but the user's finger is also based on the screen; the control is moving, and the origin of the position information is also changing; therefore, the displacement calculated using the initial position information and the end position information is the displacement of the finger relative to the list; the displacement of the finger relative to the list will change; for example, the displacement of the finger relative to the list may remain unchanged, become smaller, or be in the opposite direction; when using the displacement of the finger relative to the list to calculate the sliding distance of the list after the sliding operation, the calculated instantaneous speed of the list at the end position is incorrect, resulting in an incorrect calculated sliding distance; thus, there is a gap between the calculated sliding distance and the user's expectation, and the list cannot slide to the position the user wants.

[0081] For another example, when the terminal device displays a list and part of the header area, or when the terminal device displays only the list, the user slides the list downward; first, the header area will expand, at which time, the container will move downward as a whole, that is, the list will move downward as a whole; then, the controls in the container will scroll in the container, that is, the list will scroll again; the terminal device uses the position information relative to the controls to determine the sliding distance of the list; for example, referring to Figure 3 As shown, at this time, point C is the initial position of the sliding operation. Point C is located on control 1. A coordinate system c is established with the upper left corner of control 1 as the origin. The terminal device obtains the position information of point C in the coordinate system c. The terminal device uses the position information of point C in the coordinate system c as the initial position. Point A is the end position of the sliding operation. Point A is located on control 3. A coordinate system a is established with the upper left corner of control 3 as the origin. The terminal device obtains the position information of point A in the coordinate system a. The terminal device uses the position information of point A in the coordinate system a as the end position information. During this sliding operation, the header will be expanded first, causing the list to move downward based on the screen of the terminal device, but the user's finger is also based on the screen; therefore, the displacement calculated using the initial position information and the end position information is the displacement of the finger relative to the list; which will cause the displacement of the finger relative to the list to change. Similarly, based on the above analysis, there will be a gap between the calculated sliding distance and the user's expectations, and the list cannot slide to the position the user wants.

[0082] In the present application, when the user performs a sliding operation, the user's finger will go through the actions of pressing, moving, and lifting on the screen of the terminal device. The terminal device obtains the time when the "press" event occurs, and determines that the touch point touched by the user is the initial touch point; the terminal device takes a certain point on the screen of the terminal device as the origin, and establishes a first coordinate system, that is, the first coordinate system is the coordinate system where the screen of the terminal device is located, for example, the first coordinate system is established with the upper left corner of the screen as the origin; the terminal device can obtain the position information of the initial touch point in the first coordinate system, and the terminal device uses the position information as the position information of the initial touch point, that is, as the first position information. The terminal device obtains the time when the "lift" event occurs, and determines that the touch point touched by the user is the termination touch point; similarly, based on the first coordinate system where the screen of the terminal device is located, the terminal device can obtain the position information of the termination touch point in the first coordinate system, and the terminal device uses the position information as the position information of the termination touch point, that is, as the second position information. The terminal device determines the sliding time of the current sliding operation based on the time when the "press" event occurs and the time when the "lift" event occurs; that is, the terminal device subtracts the time when the user triggers the initial touch point from the time when the user triggers the end touch point to obtain the sliding time.

[0083] For example, Figure 4 A schematic diagram of a list provided in an embodiment of the present application Figure 3 ,like Figure 4 As shown, the terminal device provides three header areas on the display interface, one header area is used to display a search box, another header area is used to display advertisements, and the remaining header area is used to display selection icons for "comprehensive sorting", "sales sorting", "price sorting", and "filtering"; a list is provided, which is a container with multiple controls in the container, each of which is used to display content, for example, the content on control 1, the content on control 2, and the content on control 3 are currently displayed. Figure 4 As shown, the user first touches point D, which is the initial touch point of the sliding operation. The terminal device obtains the position information of point D in the first coordinate system, and the terminal device uses the position information of point D in the first coordinate system as the first position information; the user slides, and the user's finger passes through point E; the user ends the sliding, and the position where the user lifts his finger is point F, which is the end touch point of the sliding operation. The terminal device obtains the position information of point F in the first coordinate system, and the terminal device uses the position information of point F in the first coordinate system as the second position information; at this time, the user slides the list upward; the terminal device calculates the sliding time based on the time when the user touches point D and the time when the user touches F. When the user slides the list downward, the terminal device obtains the position information of the initial touch point, the position information of the end touch point, and the sliding time in the above manner.

[0084] 102. Determine a sliding distance of the list displayed by the terminal device according to the sliding operation information.

[0085] In this embodiment, the terminal device has acquired the position information of the initial touch point, the position information of the end touch point and the sliding time, and can calculate the sliding distance of the list according to the displacement method of physics.

[0086] 103. Slide the list according to the sliding distance.

[0087] In this embodiment, the terminal device controls the list to slide, and after the list slides the sliding distance calculated in step 102, the terminal device controls the list to stop sliding.

[0088] In this embodiment, sliding operation information is obtained when the user performs a sliding operation, wherein the sliding operation information includes first position information, second position information and sliding time, wherein the first position information is the position information of the initial touch point during the sliding operation, the second position information is the position information of the terminal touch point during the sliding operation, the sliding time is the time for the sliding operation to slide from the initial touch point to the terminal touch point, and the first position information and the second position information are both position information obtained with the first coordinate system as the coordinate system, and the first coordinate system is the coordinate system where the screen of the terminal device is located; according to the sliding operation information, the sliding distance of the list displayed by the terminal device is determined; according to the sliding distance, the list is slid. When a user slides a list displayed on the screen of a terminal device, the terminal device determines the distance the list needs to slide after the sliding operation based on the relative position information between the initial touch point of the sliding operation and the screen, and the relative position information between the terminal touch point of the sliding operation and the screen. The relative position information between the touch point and the control is no longer used to determine the sliding distance. The problem of inaccurate calculated sliding distance is avoided. The sliding distance of the list can be determined more accurately, and the calculated sliding distance is consistent with the user's expectations, and the list can be slid to the position desired by the user. The sliding effect of the list can be optimized to enhance the user experience.

[0089] Figure 5 A flowchart of another list processing method provided in an embodiment of the present application. Figure 5 As shown, the method includes:

[0090] 201. Obtain third position information corresponding to an initial touch point, fourth position information corresponding to an end touch point, and a sliding time when a user performs a sliding operation, wherein the third position information is position information obtained by using the second coordinate system as a coordinate system, the second coordinate system is a coordinate system in which a first control where the initial touch point is located is located, and the fourth position information is position information obtained by using the third coordinate system as a coordinate system, the third coordinate system is a coordinate system in which a second control where the end touch point is located is located, and the first control and the second control are located in a list.

[0091] In this embodiment, the execution subject of this embodiment may be a terminal device, or a server, or a list processing device or device, or other devices or equipment that can execute the method of this embodiment. This embodiment is described with the execution subject being a terminal device.

[0092] For an introduction to the list and background principles, see Figure 2 The embodiments shown will not be described in detail.

[0093] When the user performs a sliding operation, the user's finger will press, move, and lift on the screen of the terminal device. The terminal device obtains the time when the "press" event occurs, and determines the touch point touched by the user as the initial touch point; the initial touch point is located on the first control, and the terminal device uses a certain point of the first control as the origin to establish a second coordinate system, that is, the second coordinate system is the coordinate system where the first control is located; for example, the second coordinate system is established with the upper left corner of the first control as the origin; the terminal device can determine the position information of the initial touch point on the second coordinate system, and the terminal device uses this position information as the position information of the initial touch point, that is, as the third position information. The terminal device obtains the time when the "lift" event occurs, and determines that the touch point touched by the user is the termination touch point; the termination touch point is located on the second control, and the terminal device establishes a third coordinate system with a certain point of the second control as the origin, that is, the third coordinate system is the coordinate system where the second control is located; for example, the third coordinate system is established with the upper left corner of the second control as the origin; the terminal device can determine the position information of the termination touch point in the third coordinate system, and the terminal device uses the position information as the position information of the termination touch point, that is, as the fourth position information.

[0094] The terminal device determines the sliding time of the sliding operation according to the time when the user triggers the initial touch point and the time when the user triggers the final touch point; that is, the terminal device subtracts the time when the user triggers the initial touch point from the time when the user triggers the final touch point to obtain the sliding time.

[0095] For example, refer to Figure 4 As shown, the user first touches point D, which is the initial touch point of the sliding operation, and point D is located on control 3; a second coordinate system is established with the upper left corner of control 3 as the origin, and the terminal device can determine the position information of point D in the second coordinate system, and the terminal device uses the position information of point D in the second coordinate system as the third position information; the user slides, and the user's finger passes through point E; the user ends the sliding, and the position where the user lifts his finger is point F, which is the end touch point of the sliding operation, and point F is located on control 1; a third coordinate system is established with the upper left corner of control 1 as the origin, and the terminal device can determine the position information of point F in the third coordinate system, and the terminal device uses the position information of point F in the third coordinate system as the fourth position information; at this time, the user slides the list upward; the terminal device calculates the sliding time based on the time when the user touches point D and the time when the user touches F. When the user slides the list downward, the terminal device obtains the position information of the initial touch point, the position information of the end touch point, and the sliding time in the above manner.

[0096] 202. Using the first coordinate system as a reference coordinate system, convert the third position information into the first position information, and convert the fourth position information into the second position information.

[0097] Optionally, step 202 specifically includes the following steps:

[0098] The first step is to convert the value represented by the third position information into a zero value to obtain a first intermediate value, and to convert the value represented by the fourth position information into a zero value to obtain a second intermediate value.

[0099] In the second step, based on the first coordinate system as a reference coordinate system, the first intermediate value is converted into the first position information, and the second intermediate value is converted into the second position information.

[0100] In this embodiment, since the position acquired in step 201 is relative to the control, the position information relative to the control needs to be converted into position information relative to the screen.

[0101] The terminal device uses a certain point on the screen as the origin to establish a first coordinate system; the terminal device uses the first coordinate system as a reference coordinate system, converts the third position information into the above-mentioned first position information, and converts the fourth position information into the above-mentioned second position information.

[0102] Specifically, the terminal device first converts all coordinate values ​​of the third position information to zero values, thereby obtaining a first intermediate value; then, the terminal device uses the first coordinate system as a reference coordinate system to perform translation processing on the first intermediate value to obtain the first position information. The terminal device first converts all coordinate values ​​of the fourth position information to zero values, thereby obtaining a second intermediate value; then, the terminal device uses the first coordinate system as a reference coordinate system to perform translation processing on the second intermediate value to obtain the second position information.

[0103] For example, refer to Figure 4 As shown, point D is the initial touch point of the sliding operation, and point D is located on control 3; a second coordinate system is established with the upper left corner of control 3 as the origin, and the terminal device can determine the position information of point D in the second coordinate system. The terminal device uses the position information of point D in the second coordinate system as the third position information (x1, y1); then, the terminal device translates the third position information (x1, y1) to obtain the coordinate value (0, 0); then, the terminal device uses the first coordinate system as the reference coordinate system, translates the initial touch point, and obtains the first coordinate information (x2, y2).

[0104] 203. Determine a moving distance according to the first position information and the second position information.

[0105] In this embodiment, the terminal device determines the position of the initial touch point relative to the screen and the position of the termination touch point relative to the screen; the terminal device obtains the first position information and the second position information.

[0106] Then, the terminal device performs displacement calculation on the coordinate value of the first position information and the coordinate value of the second position information to obtain the moving distance.

[0107] 204. Determine an instantaneous speed corresponding to the list according to the moving distance and the sliding time.

[0108] In this embodiment, the terminal device divides the moving distance by the sliding time to obtain an instantaneous speed, which is the instantaneous speed of the list after the user completes the sliding operation.

[0109] Moreover, during the sliding operation, for any moment during the sliding operation, the terminal device can use the above method to determine the touch point at any moment, and determine the position information of the touch point at any moment, and the sliding time at any moment; the terminal device can determine the displacement at any moment based on the position information of the touch point at any moment, and the position information of the initial touch point; the terminal device divides the displacement at any moment by the corresponding sliding time to obtain the instantaneous speed at any moment.

[0110] 205. Determine a sliding distance of the list according to the instantaneous speed and the preset deceleration.

[0111] In this embodiment, the terminal device pre-sets a deceleration a; for each time t after the sliding operation, the terminal device can determine the sliding speed v=v0+at of the list at each time t, where v0 is the instantaneous speed.

[0112] Then, for each time t after the sliding operation, the terminal device determines the displacement s=v0*t+(1 / 2)*a*t of the list at each time t 2 .

[0113] Furthermore, the terminal device can determine the time when the list stops sliding, that is, determine the stop time period T = -v0 / a; thus, the terminal device can determine that when the list stops sliding, the sliding distance of the list is s1 = v0*T+(1 / 2)*a*T 2 .

[0114] 206. Determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration.

[0115] In this embodiment, referring to step 205, the terminal device determines the stop time period T; the terminal device may also determine the sliding speed v of the list at each time t within the stop time period T.

[0116] The following code can be used to calculate the sliding speed v of the list at each time t within T.

[0117]

[0118]

[0119] 207. Control the sliding distance of the list within the stop time period at the sliding speed at each moment.

[0120] In this embodiment, after the user lifts his finger, a sliding operation is completed, and then the terminal device can control the list to slide at a sliding speed v corresponding to the moment t at each moment t; and the terminal device controls the list to stop sliding within the stop time period T, and the terminal device controls the list to slide a distance s1. Thus, inertial sliding is achieved.

[0121] The terminal device can pass the interaction speed v to the control through the following code to achieve sliding of the list, that is, inertial sliding.

[0122] public boolean fling(int velocityX,int velocityY){return super.fling(velocityX,(int)mVelocityY);}.

[0123] 208. Obtain a click operation instruction from the user; and control the list to stop sliding according to the click operation instruction.

[0124] In this embodiment, during the sliding process in step 207, the user inputs a stop instruction, that is, the user clicks the screen of the terminal device; at this time, the terminal device obtains the user's click operation instruction; at this time, the terminal device controls the list to stop sliding. Thus, through human-computer interaction, the list can be controlled to stop moving and sliding.

[0125] In this embodiment, when a user slides the list displayed on the screen of the terminal device, the terminal device determines the distance that the list needs to slide after the sliding operation based on the relative position information between the initial touch point of the sliding operation and the screen, and the relative position information between the end touch point of the sliding operation and the screen; the relative position information between the touch point and the control is no longer used to determine the sliding distance; the problem of inaccurate calculated sliding distance is avoided; the sliding distance of the list can be determined more accurately, and the calculated sliding distance is consistent with the user's expectations, and the list can slide to the position desired by the user; and no matter how the position of the list changes, the list scrolling effect seen by the user is consistent with the user's expectations; the sliding effect of the list can be optimized to improve the user experience. In addition, after the sliding operation, the terminal device can calculate the list stop time period and the sliding speed of the list at each moment in the stop time period. The sliding speed is also calculated based on the relative position of the screen, rather than based on the control, so that visually, the scrolling of the list is actually based on the screen, and the sliding speed displayed to the user is consistent with the user's expectations.

[0126] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device of this embodiment may include:

[0127] The first acquisition unit 31 is used to obtain sliding operation information when the user performs a sliding operation, wherein the sliding operation information includes first position information, second position information and sliding time, wherein the first position information is the position information of the initial touch point during the sliding operation, the second position information is the position information of the terminal touch point during the sliding operation, and the sliding time is the time for the sliding operation to slide from the initial touch point to the terminal touch point. The first position information and the second position information are both position information obtained with the first coordinate system as the coordinate system, and the first coordinate system is the coordinate system where the screen of the terminal device is located.

[0128] The determining unit 32 is used to determine the sliding distance of the list displayed by the terminal device according to the sliding operation information.

[0129] The sliding unit 33 is used to slide the list according to the sliding distance.

[0130] The terminal device of this embodiment can execute a list processing method provided in the embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0131] Figure 7 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application, in Figure 6 Based on the embodiment shown, Figure 7As shown, the terminal device of this embodiment, the first acquisition unit 31, includes:

[0132] The acquisition module 311 is used to obtain the third position information corresponding to the initial touch point, the fourth position information corresponding to the terminal touch point and the sliding time when the user performs a sliding operation, wherein the third position information is the position information obtained by using the second coordinate system as the coordinate system, the second coordinate system is the coordinate system where the first control where the initial touch point is located, and the fourth position information is the position information obtained by using the third coordinate system as the coordinate system, the third coordinate system is the coordinate system where the second control where the terminal touch point is located, and the first control and the second control are located in a list.

[0133] The conversion module 312 is used to convert the third position information into the first position information and convert the fourth position information into the second position information by taking the first coordinate system as the reference coordinate system.

[0134] The conversion module 312 includes:

[0135] The first conversion submodule 3121 is used to convert the value represented by the third position information into a zero value to obtain a first intermediate value, and to convert the value represented by the fourth position information into a zero value to obtain a second intermediate value.

[0136] The second conversion submodule 3122 is used to convert the first intermediate value into the first position information and convert the second intermediate value into the second position information based on the first coordinate system as the reference coordinate system.

[0137] The determining unit 32 includes:

[0138] The first determining module 321 is used to determine the moving distance according to the first position information and the second position information.

[0139] The second determination module 322 is used to determine the instantaneous speed corresponding to the list according to the moving distance and the sliding time.

[0140] The third determination module 323 is used to determine the sliding distance of the list according to the instantaneous speed and the preset deceleration.

[0141] The sliding unit 33 comprises:

[0142] The fourth determination module 331 is used to determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration.

[0143] The sliding module 332 is used to control the sliding distance of the list within the stop time period at a sliding speed at each moment.

[0144] The terminal device also includes:

[0145] The second acquisition unit 41 is used to acquire a click operation instruction of the user.

[0146] The stop module 42 is used to control the list to stop sliding according to the click operation instruction.

[0147] The terminal device of this embodiment can execute another list processing method provided in the embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0148] Figure 8 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the present application embodiment provides a terminal device that can be used to perform Figure 2 ,or Figure 5 The terminal device actions or steps in the illustrated embodiment specifically include: a processor 2701 , a memory 2702 and a communication interface 2703 .

[0149] The memory 2702 is used to store computer programs.

[0150] Processor 2701 is used to execute the computer program stored in memory 2702 to implement Figure 2 ,or Figure 5 The actions of the terminal device in the illustrated embodiment will not be described in detail.

[0151] Optionally, the terminal device may further include a bus 2704. The processor 2701, the memory 2702, and the communication interface 2703 may be interconnected via the bus 2704; the bus 2704 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 2704 may be divided into an address bus, a data bus, and a control bus. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0152] In the embodiments of the present application, the above embodiments can refer to and learn from each other, and the same or similar steps and nouns will not be repeated one by one.

[0153] Alternatively, part or all of the above modules may be implemented by being embedded in a chip of the terminal device in the form of an integrated circuit. They may be implemented separately or integrated together. That is, the above modules may be configured as one or more integrated circuits for implementing the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs).

[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 2702 including instructions, and the instructions can be executed by the processor 2701 of the terminal device to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0155] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the processing method of the above list.

[0156] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a terminal device or a data center by wired (for example, coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode to another website site, computer, terminal device or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a terminal device, a data center, etc. that contains one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0157] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0158] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for processing a list, characterized in that: Applied to a terminal device, the terminal device is used to display a list, and the method includes: Obtaining sliding operation information when a user performs a sliding operation, wherein the sliding operation information includes first position information, second position information, and sliding time, wherein the first position information is position information of an initial touch point during the sliding operation, the second position information is position information of an end touch point during the sliding operation, the sliding time is the time it takes for the sliding operation to slide from the initial touch point to the end touch point, and both the first position information and the second position information are position information obtained using a first coordinate system as a coordinate system, and the first coordinate system is a coordinate system where the screen of the terminal device is located; determining a moving distance according to the first position information and the second position information; Determining an instantaneous speed corresponding to the list according to the moving distance and the sliding time; Determining a sliding distance of the list according to the instantaneous speed and a preset deceleration; Slide the list according to the sliding distance; The obtaining of sliding operation information when the user performs a sliding operation includes: Acquire third position information corresponding to the initial touch point, fourth position information corresponding to the end touch point, and the sliding time when the user performs the sliding operation, wherein the third position information is position information obtained by taking the second coordinate system as the coordinate system, the second coordinate system is the coordinate system where the first control where the initial touch point is located is located, the fourth position information is position information obtained by taking the third coordinate system as the coordinate system, the third coordinate system is the coordinate system where the second control where the end touch point is located is located, and the first control and the second control are located in the list; Convert the value represented by the third position information to a zero value to obtain a first intermediate value, and convert the value represented by the fourth position information to a zero value to obtain a second intermediate value; According to the first coordinate system as a reference coordinate system, the first intermediate value is converted into the first position information, and the second intermediate value is converted into the second position information.

2. The method according to claim 1, characterized in that Sliding the list according to the sliding distance includes: Determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration; The list is controlled to slide the sliding distance within the stop time period at the sliding speed at each moment.

3. The method according to claim 1, characterized in that: The method further comprises: Get the user's click operation instructions; According to the click operation instruction, the list is controlled to stop sliding.

4. A terminal device, characterized in that: The terminal device is used to display a list, and the terminal device includes: a first acquisition unit, configured to acquire sliding operation information when a user performs a sliding operation, wherein the sliding operation information includes first position information, second position information, and sliding time, wherein the first position information is position information of an initial touch point during the sliding operation, the second position information is position information of an end touch point during the sliding operation, the sliding time is the time taken for the sliding operation to slide from the initial touch point to the end touch point, and both the first position information and the second position information are position information obtained using a first coordinate system as a coordinate system, and the first coordinate system is a coordinate system where the screen of the terminal device is located; a determining unit, configured to determine a sliding distance of the list displayed by the terminal device according to the sliding operation information; A sliding unit, used for sliding the list according to the sliding distance; The determining unit comprises: A first determining module, configured to determine a moving distance according to the first location information and the second location information; A second determination module, configured to determine an instantaneous speed corresponding to the list according to the moving distance and the sliding time; A third determination module, configured to determine a sliding distance of the list according to the instantaneous speed and a preset deceleration; The first acquisition unit includes: an acquisition module, used for acquiring third position information corresponding to the initial touch point, fourth position information corresponding to the termination touch point, and the sliding time when the user performs the sliding operation, wherein the third position information is position information obtained by taking the second coordinate system as the coordinate system, the second coordinate system is the coordinate system where the first control where the initial touch point is located is located, the fourth position information is position information obtained by taking the third coordinate system as the coordinate system, the third coordinate system is the coordinate system where the second control where the termination touch point is located is located, and the first control and the second control are located in the list; a conversion module, configured to convert the third position information into the first position information and convert the fourth position information into the second position information by taking the first coordinate system as a reference coordinate system; The conversion module comprises: A first conversion submodule, configured to convert the value represented by the third position information into a zero value to obtain a first intermediate value, and convert the value represented by the fourth position information into a zero value to obtain a second intermediate value; A second conversion submodule is configured to convert the first intermediate value into the first position information and convert the second intermediate value into the second position information based on the first coordinate system as a reference coordinate system.

5. The terminal device according to claim 4, characterized in that: The sliding unit comprises: A fourth determination module, used to determine the stop time period and the sliding speed of the list at each moment in the stop time period according to the instantaneous speed and the preset deceleration; The sliding module is used to control the list to slide the sliding distance within the stop time period at the sliding speed at each moment.

6. The terminal device according to claim 4, characterized in that: The terminal device further includes: A second acquisition unit is used to acquire a click operation instruction of the user; The stop module is used to control the list to stop sliding according to the click operation instruction.

7. A terminal device, characterized in that: include: processor, memory and computer program; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Touch screen sliding finding method and touch screen equipment

    CN103309599A

  • Method and device for determining sliding operation on touch screen and terminal

    CN103809913A

  • List display control apparatus and method

    CN105426073A

  • User interface for text input on three dimensional interface

    US20140189569A1