Sliding processing method and device, equipment and storage medium
By linking the sliding of the outer and inner lists, the problem of cumbersome user interaction process in the existing technology is solved, the user experience is improved, and sliding conflicts are avoided.
Patent Information
- Application Number
- CN202510097647.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the sliding of the outer and inner lists in the user interaction page is independent, resulting in cumbersome user interaction process and poor user experience.
By responding to user sliding operations, determine the sliding direction and target inner layer list, calculate the sliding offset and threshold of the outer layer list and inner layer list, realize the linkage sliding between the outer layer list and the inner layer list, and automatically switch the sliding direction.
It reduces user interaction, improves user interaction experience, and avoids conflicts caused by the simultaneous sliding of outer and inner lists.
Smart Images

Figure CN120010730A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a sliding processing method, device, equipment and storage medium. Background Art
[0002] Lists can be used in user interaction pages to carry information in the form of items, making it easy for users to browse. When it is necessary to display a more complex information hierarchy in the user interaction page, it can be achieved through nested lists, such as nesting one or more inner lists in an outer list. However, at present, the user's sliding of the outer list and the sliding of the inner list are completely independent. When the user slides the outer list, the list items of the inner list will not slide with the sliding of the outer list. The user can only view the information in the fixed inner list and can obtain less information. If the user needs to view more information in the inner list, it is necessary to trigger the sliding of the inner list additionally. If the user needs to slide the outer list, it is necessary to re-trigger the sliding of the outer list. The whole interaction process is relatively cumbersome and the user's interaction experience is poor. Summary of the invention
[0003] The embodiments of the present invention provide a sliding processing method, device, equipment and storage medium to solve the problem of complicated user interaction process in the prior art.
[0004] In a first aspect, an embodiment of the present invention provides a sliding processing method, comprising: in response to a sliding operation on a user interaction page, determining a sliding direction and determining a target inner list; wherein the user interaction page is used to display an outer list; the outer list nests at least one inner list;
[0005] Determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list;
[0006] In the case where the sliding direction is the first direction, if the first sliding offset is less than the first sliding threshold corresponding to the target inner list, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset;
[0007] When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0008] In a second aspect, an embodiment of the present invention provides a sliding processing device, the device comprising:
[0009] A response module, configured to determine a sliding direction and a target inner list in response to a sliding operation on a user interaction page; wherein the user interaction page is used to display an outer list; and the outer list is embedded with at least one inner list;
[0010] A determination module, configured to determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list;
[0011] a sliding module, configured to, when the sliding direction is the first direction, fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset is less than the first sliding threshold corresponding to the target inner list; fix the outer list and slide the target inner list according to the second sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list; and fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold;
[0012] When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the sliding processing method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.
[0014] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the sliding processing method as described in the first aspect above.
[0015] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor can implement the sliding processing method in the first aspect as described above.
[0016] In an embodiment of the present invention, a user terminal determines a sliding direction and a target inner list in response to a sliding operation on a user interaction page; wherein the user interaction page is used to display an outer list; the outer list nests at least one inner list; a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list are determined; when the sliding direction is a first direction, if the first sliding offset is less than a first sliding threshold corresponding to the target inner list, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list, the outer list is fixed and the outer list is slid according to the second sliding offset The target inner list is moved by the shift; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; when the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset. By comparing the first sliding offset with the first sliding threshold, comparing the second sliding offset with the second sliding threshold, and judging whether the second sliding offset is zero, it is determined whether to execute the fixed target inner sliding outer list or the fixed outer list sliding inner list. By linking the inner list with the outer list, the outer list and the inner list are automatically slid and switched, so as to avoid the user triggering the sliding operation on the outer list or the inner list alone, thereby reducing the user's interactive operations and improving the user's interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A flowchart of an embodiment of a sliding processing method provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of displaying a user interaction page in an actual application of an embodiment of the present invention;
[0020] Figure 3 A schematic structural diagram of a sliding processing device provided by an embodiment of the present invention;
[0021] Figure 4 For Figure 3 The illustrated embodiment is a schematic structural diagram of an electronic device corresponding to the sliding processing device provided by the illustrated embodiment. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] The technical solution of the embodiment of the present invention can be applied to a scenario in which a user performs a sliding operation on a user interaction page.
[0024] As described in the background technology, for nested lists, the user's sliding of the outer list and the sliding of the inner list are completely independent. When the user slides the outer list, the list items in the inner list will not slide with the sliding of the outer list. The user can only view the information in the fixed inner list, and the information that can be obtained is relatively small. If the user needs to view more information in the inner list, it is necessary to trigger the sliding of the inner list additionally. If the user needs to slide the outer list, it is necessary to re-trigger the sliding of the outer list. The whole interaction process is rather cumbersome, and the user's interaction experience is poor.
[0025] In order to solve the technical problem of cumbersome user interaction process, the inventors thought of linking the outer list with the inner list to reduce the user's triggering operations. Therefore, after a series of studies, the inventors proposed the technical solution of the present invention. In an embodiment of the present invention, the user terminal determines the sliding direction and the target inner list in response to the sliding operation on the user interaction page; wherein the user interaction page is used to display the outer list; the outer list nests at least one inner list; determines the first sliding offset corresponding to the outer list and the second sliding offset corresponding to the target inner list; when the sliding direction is the first direction, if the first sliding offset is less than the first sliding threshold corresponding to the target inner list, fix the target inner list and slide the outer list according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list value, fix the outer list and slide the target inner list according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, fix the inner list and slide the outer list according to the first sliding offset; when the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, fix the target inner list and slide the outer list according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, fix the outer list and slide the target inner list according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, fix the inner list and slide the outer list according to the first sliding offset.
[0026] The embodiment of the present invention determines whether to perform a fixed target inner sliding of the outer list or a fixed outer list sliding of the inner list by comparing the first sliding offset with the first sliding threshold, comparing the second sliding offset with the second sliding threshold, and judging whether the second sliding offset is zero. By linking the inner list with the outer list, the outer list and the target inner list are automatically slid and switched, thereby avoiding the user triggering a sliding operation on the outer list or the inner list alone, thus reducing the user's interactive operations and improving the user's interactive experience. Specifically, when the outer list is scrolled, the inner list is fixed, and when the inner list is scrolled, the outer list is fixed, thereby avoiding conflicts caused by simultaneous scrolling of the outer list and the inner list.
[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0028] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features and steps in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0029] Figure 1 This is a flow chart of an embodiment of a sliding processing method provided by an embodiment of the present invention. The technical solution of this embodiment can be executed by a user end. The method may include the following steps:
[0030] 101: In response to a sliding operation on a user interaction page, determine a sliding direction and a target inner layer list.
[0031] The user interaction page may be used to display an outer list, and the outer list may nest at least one inner list.
[0032] A list is a page element that can organize and display multiple items in a specific order. Each item is called a list item. For nested lists, an outer list can contain one or more outer list items. An inner list is an outer list item, and an inner list can contain one or more inner list items.
[0033] Among them, the inner list can be arranged horizontally or vertically in the outer list as an outer list item, and the arrangement direction of the inner list items in the inner list can be the same as that of the outer list items in the outer list. If the outer list items are arranged horizontally in the outer list, when the outer list slides horizontally, one or more inner lists nested in the outer list will scroll horizontally; if the outer list items are arranged vertically in the outer list, when the outer list slides vertically, one or more inner lists nested in the outer list will scroll vertically; if the inner list items are arranged horizontally in the inner list, when the inner list slides horizontally, one or more inner list items in the inner list will scroll horizontally; if the inner list items are arranged vertically in the inner list, when the inner list slides vertically, one or more inner list items in the inner list will scroll vertically.
[0034] Optionally, the inner layer list corresponding to the current user touch position may be determined as the target inner layer list, or one or more inner layer lists currently displayed may be determined as the target inner layer list.
[0035] The sliding direction can be calculated based on the current scroll offset of the scroll view of the user interaction page relative to the last scroll offset, and the scroll offset can refer to the offset relative to the starting position of the scroll view before the scrolling operation occurs. For example, in the vertical direction, if the current scroll offset is greater than the scroll offset of the previous frame, the sliding direction is upward, and if the current scroll offset is less than the scroll offset of the previous frame, the sliding direction is downward. Since the interval between recording the current scroll offset and recording the last scroll offset is very short, the sliding direction can be determined in real time.
[0036] 102: Determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list.
[0037] Among them, the first sliding offset corresponding to the outer list can be determined according to the first reference position of the outer list; and the second sliding offset corresponding to the target inner list can be determined according to the second reference position of the target inner list.
[0038] Among them, the first reference position of the outer list may refer to the starting position of the outer list before the sliding operation is performed. The second reference position of the target inner list may refer to the starting position of the target inner list before the sliding operation is performed. The first sliding offset may reflect how far the outer list has slid from the starting position, and the first sliding offset corresponding to the starting position of the outer list is zero; the second sliding offset may reflect how far the target inner list has slid from the starting position, and the second sliding offset corresponding to the starting position of the target inner list is zero.
[0039] 103: According to the first sliding offset, the first sliding threshold corresponding to the target inner list, the second sliding offset, and the second sliding threshold corresponding to the target inner list, fix the target inner list and slide the outer list according to the first sliding offset or fix the outer list and slide the target inner list according to the second sliding offset.
[0040] Among them, when the sliding direction is the first direction, if the first sliding offset is less than the first sliding threshold corresponding to the target inner list, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0041] When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0042] Among them, the fixed outer list refers to that the fixed outer list does not slide, and the fixed target inner list refers to that the fixed target inner list does not slide.
[0043] In the process of implementing the present invention, the inventors discovered that, in the traditional method, the sliding gesture recognizer corresponding to the outer list and the sliding gesture recognizer corresponding to the inner list will not recognize the user's sliding gesture at the same time. Therefore, when the user slides the outer list, the sliding gesture recognizer of the outer list will recognize the user's sliding gesture, and when the user slides the inner list, the sliding gesture recognizer of the inner list will recognize the user's sliding gesture. This method causes the sliding of the outer list and the sliding of the inner list to be completely independent. When the user wants to switch from sliding the outer list to sliding the inner list or from sliding the inner list to sliding the outer list, different sliding operations need to be triggered, resulting in a cumbersome user interaction process.
[0044] Therefore, the inventor proposes that in this solution, the sliding gesture recognizer corresponding to the outer list and the sliding gesture recognizer corresponding to the inner list can simultaneously recognize the user's sliding gesture to realize the linkage between the outer list and the inner list, and slide the outer list when the target inner list is fixed or slide the target inner list when the outer list is fixed through threshold judgment, so as to avoid the conflict between the outer list and the inner list sliding at the same time.
[0045] In this embodiment, in response to a user's sliding operation on a user interaction page, by comparing the first sliding offset with the first sliding threshold, comparing the second sliding offset with the second sliding threshold, and judging whether the second sliding offset is zero, it is determined whether to execute a fixed target inner sliding outer list or a fixed outer list sliding inner list. By linking the inner list with the outer list, sliding switching between the outer list and the inner list is automatically performed, thereby avoiding the user triggering a sliding operation on the outer list or the inner list alone, thereby reducing the user's interactive operations and improving the user's interactive experience. Specifically, when the outer list is scrolled, the inner list is fixed, and when the inner list is scrolled, the outer list is fixed, thereby avoiding conflicts caused by simultaneous scrolling of the outer list and the inner list.
[0046] In some embodiments, the method may further include: obtaining a first sliding threshold determined according to a distance between a boundary of a component to which the target inner list belongs and a boundary of a sliding area of the outer list.
[0047] Among them, different inner lists are arranged at different positions of the outer list. Therefore, the distances between the boundary of the component to which the inner list belongs and the boundary of the slidable area of the outer list are different, and the first sliding thresholds corresponding to different inner lists are also different.
[0048] The outer list may include a fixed display area and a slidable area. The outer list items in the fixed display area always remain in the same position in the visible window and are not affected by the sliding of the outer list. The outer list items in the slidable area can be dynamically displayed in the visible window according to the sliding of the outer list. Of course, the outer list may not include a fixed display area, and all outer list items in the outer list can be slidable.
[0049] Among them, optionally, the outer list can directly contain the inner list, and the component to which the target inner list belongs can refer to the target inner list itself, that is, the target inner list component. Optionally, the outer list can also contain multiple common components such as grid components, etc. Different inner lists can be distributed in different common components, and the component to which the target inner list belongs can refer to the common component to which the target inner list belongs. Therefore, the component to which the target inner list belongs can refer to the target inner list itself, that is, the target inner list component, or it can refer to the common component to which the target inner list belongs.
[0050] As an optional method, the user end can obtain the first sliding threshold determined by the server end according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list. The server end can calculate the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list according to the boundary coordinates of the component to which the target inner list belongs and the boundary coordinates of the sliding area of the outer list, and determine the first sliding threshold according to the distance.
[0051] As another optional method, the user end can obtain the boundary coordinates of the component to which the target inner list belongs and the boundary coordinates of the sliding area of the outer list sent by the server, and then the user end calculates the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list, and determines the first sliding threshold based on the distance.
[0052] As another optional method, the user end can respond to the developer's configuration operation, obtain the boundary coordinates of the component to which the target inner list belongs and the boundary coordinates of the sliding area of the outer list, calculate the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list, and determine the first sliding threshold based on the distance.
[0053] In some embodiments, obtaining the first sliding threshold determined based on the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list may include: obtaining the first sliding threshold determined based on the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list and the allowable error range.
[0054] For example, if the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list is D, and the error tolerance range is ±E, then the first sliding threshold range can be set to [DE, D+E]. If the error tolerance range is zero, then the first sliding threshold is equal to the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list.
[0055] In some embodiments, the method may further include: obtaining a second sliding threshold determined according to a difference between a length of an inner list item of the target inner list and a component size.
[0056] The second sliding threshold may be equal to a difference between the length of the inner list item of the target inner list and the component size.
[0057] As an optional manner, the user end may obtain the second sliding threshold determined by the server end according to the difference between the length of the inner list item of the target inner list and the component size.
[0058] As another optional method, the user end may obtain the inner list item length and component size of the target inner list sent by the server end, and then calculate the difference between the inner list item length and component size of the target inner list to determine the second sliding threshold.
[0059] As another optional method, the user terminal can obtain the inner list item length and component size of the target inner list in response to the developer's configuration operation, calculate the difference between the inner list item length and component size of the target inner list, and determine the second sliding threshold.
[0060] In some embodiments, optionally, if one or more inner lists are arranged vertically in the outer list, and the inner list items are arranged vertically in the inner list, the sliding direction can be vertical, and the vertical direction includes upward or downward, the first direction can be upward, and the second direction can be downward.
[0061] Obtaining the first sliding threshold determined based on the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list may refer to: obtaining the first sliding threshold determined based on the distance between the top of the component to which the target inner list belongs and the top of the slidable area of the outer list. In the case where the first sliding threshold is equal to the distance between the top of the component to which the target inner list belongs and the top of the slidable area of the outer list, the first sliding offset of the outer list being less than the first sliding threshold may refer to that the outer list slides to the top of the component to which the target inner list belongs but does not reach the top of the slidable area of the outer list, the first sliding offset of the outer list reaching the first sliding threshold may refer to that the outer list slides to the top of the component to which the target inner list belongs and reaches the top of the slidable area of the outer list, and the first sliding offset of the outer list being greater than the first sliding threshold may refer to that the outer list slides to the top of the component to which the target inner list belongs and slides out of the top of the slidable area of the outer list.
[0062] The component size of the inner list may refer to the height of the target inner list, and the second sliding threshold may be the difference between the length of the inner list item of the target inner list and the component height. Therefore, the second sliding offset being less than the second sliding threshold may mean that the target inner list has not slid to the bottom of the target inner list. The second sliding offset reaching the second sliding threshold may mean that the target inner list has slid to the bottom of the target inner list. The second sliding offset being zero may mean that the target inner list has slid to the top of the target inner list, and the second sliding offset not being zero may mean that the target inner list has not slid to the top of the target inner list.
[0063] For ease of understanding, Figure 2 FIG. 4 shows a schematic diagram of displaying a user interaction page in an actual application of an embodiment of the present invention, such as Figure 2 As shown, the user interaction page 200 can display an outer list 201, which includes a fixed display area and a slidable area. The fixed display area of the outer list 201 is used to display a search box, a prompt message of "Preferential Service Evaluation Question and Answer Details" and a "Confirm" button. The area outside the fixed display area of the outer list 201 is a slidable area, and the top of the slidable area is below the prompt message of "Preferential Service Evaluation Question and Answer Details". Figure 2 As shown, the grid component 203 to which the target inner list 202 belongs is included in the outer list 201 as an outer list item. The outer list items can be arranged vertically in the outer list 201, and the inner list items can be arranged vertically in the target inner list 202.
[0064] If the first sliding threshold is equal to the distance between the top of the component to which the target inner list 202 belongs, that is, the grid component 203, and the top of the sliding area of the outer list, such as Figure 2As shown, the top of the component to which the target inner list 202 belongs, that is, the grid component 203, reaches the top of the slidable area of the outer list, and the first sliding offset reaches the first sliding threshold. Then, in the case of upward sliding direction, if the second sliding offset is less than the second sliding threshold corresponding to the target inner list 202, that is, the target inner list 202 has not slid to the bottom, the outer list 201 is fixed and the target inner list 202 is slid according to the second sliding offset; if the second sliding offset reaches the second sliding threshold, that is, the target inner list 202 slides to the bottom, the inner list 202 is fixed and the outer list is slid according to the first sliding offset. In the case of downward sliding direction, if the second sliding offset is not zero, that is, the target inner list 202 has not slid to the top of the target inner list, the outer list is fixed and the target inner list 202 is slid according to the second sliding offset; if the second sliding offset is zero, that is, the target inner list 202 slides to the top of the target inner list, the target inner list 202 is fixed and the outer list is slid according to the first sliding offset.
[0065] Optionally, if one or more inner lists are arranged horizontally in the outer list, and the inner list items are arranged horizontally in the inner list, the sliding direction can be horizontal, and horizontal includes left or right. The first direction can be left, and the second direction can be right.
[0066] Obtaining the first sliding threshold determined according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list may refer to: obtaining the first sliding threshold determined according to the distance between the left boundary of the component to which the target inner list belongs and the left boundary of the slidable area of the outer list. In the case where the first sliding threshold is equal to the distance between the top of the component to which the target inner list belongs and the top of the slidable area of the outer list, the first sliding offset of the outer list being less than the first sliding threshold may refer to the outer list sliding to the left boundary of the component to which the target inner list belongs not reaching the left boundary of the slidable area of the outer list. The first sliding offset of the outer list reaching the first sliding threshold may refer to the outer list sliding to the left boundary of the component to which the target inner list belongs reaching the left boundary of the slidable area of the outer list. The first sliding offset of the outer list being greater than the first sliding threshold may refer to the outer list sliding to the left boundary of the component to which the target inner list belongs sliding out of the left boundary of the slidable area of the outer list.
[0067] The component size of the inner list may refer to the length of the target inner list, and the second sliding threshold may be the difference between the length of the inner list item of the target inner list and the component length. Therefore, the second sliding offset being less than the second sliding threshold may refer to that the target inner list has not slid to the right boundary of the target inner list, the second sliding offset reaching the second sliding threshold may refer to that the target inner list has slid to the right boundary of the target inner list, the second sliding offset being not zero may refer to that the target inner list has not slid to the left boundary of the target inner list, and the second sliding offset being zero may refer to that the target inner list has slid to the left boundary of the target inner list.
[0068] Figure 3 A schematic diagram of a sliding processing device provided in an embodiment of the present invention, the device may include:
[0069] A response module, used to respond to a sliding operation on a user interaction page, determine a sliding direction and determine a target inner list; wherein the user interaction page is used to display an outer list; and the outer list nests at least one inner list;
[0070] A determination module, used to determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list;
[0071] A sliding module, configured to, when the sliding direction is a first direction, fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset is less than the first sliding threshold corresponding to the target inner list; fix the outer list and slide the target inner list according to the second sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list; and fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold;
[0072] When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0073] In some embodiments, the determination module determines the first sliding offset corresponding to the outer list and the second sliding offset corresponding to the target inner list, which may include: determining the first sliding offset corresponding to the outer list based on the first reference position of the outer list; determining the second sliding offset corresponding to the target inner list based on the second reference position of the target inner list.
[0074] The first reference position of the outer list may be the starting position of the outer list before the sliding operation occurs; the second reference position of the target inner list may be the starting position of the target inner list before the sliding operation occurs.
[0075] In some embodiments, the response module determining the target inner list may include: determining the inner list corresponding to the current user touch position as the target inner list; or determining at least one inner list currently displayed as the target inner list.
[0076] In some embodiments, the device may further include:
[0077] The acquisition module is used to acquire a first sliding threshold value determined according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list.
[0078] Wherein, obtaining the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list, and determining the first sliding threshold may include:
[0079] A first sliding threshold value is obtained, which is determined according to a distance between a boundary of a component to which a target inner list belongs and a boundary of a sliding area of an outer list and an allowable error range.
[0080] In some embodiments, the acquisition module may also be used to: acquire a second sliding threshold determined according to a difference between the length of an inner list item of the target inner list and the component size.
[0081] Figure 3 The device shown can perform Figure 1 The sliding processing method of the embodiment shown in the figure, for the part not described in detail in this embodiment, please refer to Figure 1 The implementation process and technical effects of this technical solution refer to Figure 1 The description in the illustrated embodiment will not be repeated here.
[0082] In one possible design, Figure 1 The sliding processing method provided in the illustrated embodiment can be applied in an electronic device, such as Figure 4 As shown, the electronic device may include: a processor 41 and a memory 42. The memory 42 is used to store the electronic device to perform the above Figure 1 The program of the sliding processing method provided in the illustrated embodiment, the processor 41 is configured to execute the program stored in the memory 42.
[0083] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 41, the following steps can be implemented:
[0084] In response to a sliding operation on a user interaction page, determining a sliding direction and a target inner list; wherein the user interaction page is used to display an outer list; and the outer list nests at least one inner list;
[0085] Determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list;
[0086] In the case where the sliding direction is the first direction, if the first sliding offset is less than the first sliding threshold corresponding to the target inner list, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset;
[0087] When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
[0088] Optionally, the processor 41 is further configured to execute the aforementioned Figure 1 All or part of the steps in the illustrated embodiments.
[0089] The structure of the electronic device may further include a communication interface 43 for the electronic device to communicate with other devices or communication systems.
[0090] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 1 The procedures involved in the sliding processing method shown.
[0091] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figure 1The steps or functions of the sliding processing method shown.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sliding processing method, characterized in that: Applied to the user side, including: In response to a sliding operation on a user interaction page, determining a sliding direction and a target inner list; wherein the user interaction page is used to display an outer list; and the outer list nests at least one inner list; Determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list; In the case where the sliding direction is the first direction, if the first sliding offset is less than the first sliding threshold corresponding to the target inner list, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
2. The method according to claim 1, characterized in that The determining of the first sliding offset corresponding to the outer list and the second sliding offset corresponding to the target inner list comprises: Determining a first sliding offset corresponding to the outer list according to a first reference position of the outer list; A second sliding offset corresponding to the target inner layer list is determined according to a second reference position of the target inner layer list.
3. The method according to claim 2, characterized in that The first reference position of the outer list is the starting position of the outer list before the sliding operation occurs; The second reference position of the target inner layer list is the starting position of the target inner layer list before the sliding operation occurs.
4. The method according to claim 1, characterized in that: The target inner list includes: Determine that the inner layer list corresponding to the current user touch position is the target inner layer list; Alternatively, it is determined that at least one inner layer list currently displayed is a target inner layer list.
5. The method according to claim 1, characterized in that Also includes: The first sliding threshold is determined according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list.
6. The method according to claim 5, characterized in that The obtaining, according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the slidable area of the outer list, determines the first sliding threshold value includes: The first sliding threshold is obtained according to the distance between the boundary of the component to which the target inner list belongs and the boundary of the sliding area of the outer list and the allowable error range.
7. The method according to claim 1, characterized in that Also includes: The second sliding threshold is obtained according to the difference between the length of the inner list item of the target inner list and the component size.
8. A sliding processing device, characterized in that: include: A response module, configured to determine a sliding direction and a target inner list in response to a sliding operation on a user interaction page; wherein the user interaction page is used to display an outer list; and the outer list is embedded with at least one inner list; A determination module, configured to determine a first sliding offset corresponding to the outer list and a second sliding offset corresponding to the target inner list; a sliding module, configured to, when the sliding direction is the first direction, fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset is less than the first sliding threshold corresponding to the target inner list; fix the outer list and slide the target inner list according to the second sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset is less than the second sliding threshold corresponding to the target inner list; and fix the target inner list and slide the outer list according to the first sliding offset if the first sliding offset reaches the first sliding threshold and the second sliding offset reaches the second sliding threshold; When the sliding direction is the second direction, if the first sliding offset is greater than the first sliding threshold, the target inner list is fixed and the outer list is slid according to the first sliding offset; if the first sliding offset reaches the first sliding threshold and the second sliding offset is not zero, the outer list is fixed and the target inner list is slid according to the second sliding offset; and if the first sliding offset reaches the first sliding threshold and the second sliding offset is zero, the target inner list is fixed and the outer list is slid according to the first sliding offset.
9. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the sliding processing method according to any one of claims 1 to 7.
10. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable codes, and when the executable codes are executed by a processor of an electronic device, the processor is caused to execute the sliding processing method according to any one of claims 1 to 7.