Method, device, storage medium and electronic device for controlling refresh of element list
By determining the position of the sliding operation point and the target element in the element list, and adjusting the display height of the refreshed demonstration element, sliding refresh at any position is realized, which solves the problems of single pull-down refresh position and sliding conflict in the existing technology, and improves the efficiency Design for efficiency and flexibility.
Patent Information
- Application Number
- CN202210259503.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The demo screen for the pull-down refresh operation in the existing Android system usually only appears at the top, which cannot meet the diverse design needs, and the sliding list layout design is complicated, especially when a sliding list is nested in the list, sliding may occur. Conflict makes it difficult for users to feel the consistency of sliding, and is difficult to implement and low in efficiency.
By determining whether the user's sliding operation point on the element list is sliding in the first direction, judging whether the target element is at the target position, adjusting the display height of the refreshed demonstration element based on the sliding distance, achieving sliding refresh at any position, and triggering it when the sliding operation ends For the refresh operation, directly specify the refresh presentation element in the element list without wrapping it in a complex layout.
It realizes setting the sliding refresh effect at any position in the element list, enriches the refresh presentation method, reduces the complexity and difficulty of list layout design, improves design efficiency, meets different design needs, and avoids sliding conflicts.
Smart Images

Figure CN114564275B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a refresh control method and device for an element list, a computer-readable storage medium, a computer program product, and an electronic device. Background Art
[0002] Currently, many applications have a pull-down refresh function. Usually, the pull-down refresh position of various applications starts from the top of the element list. For example, when designing an application in the Android operating system, this can be achieved by wrapping a layer of layout outside the RecyclerView (i.e., the element list).
[0003] The existing Android system officially provides a nested sliding layout solution, namely CoordinatorLayout+AppBarLayout+Behavior. This solution can wrap RecyclerView in CoordinatorLayout, and the operation of the list head is implemented through AppBarLayout. The sliding conflict is resolved through the NestedScrollingParent and NestedScrollingChild interfaces. Summary of the invention
[0004] Embodiments of the present disclosure provide a refresh control method, apparatus, computer-readable storage medium, electronic device, and computer program product for an element list.
[0005] An embodiment of the present disclosure provides a refresh control method for an element list, the method comprising: determining whether an operation point of a user's current sliding operation on an element list displayed on a screen slides in a first direction; in response to the operation point sliding in the first direction, determining whether a target element in the element list is in a target position; in response to the target element being in the target position, adjusting the display height of a refresh demonstration element in the element list to gradually increase from an initial height based on a sliding distance of the operation point in the first direction; in response to the sliding operation ending and the sliding distance of the operation point in the first direction satisfying a sliding distance condition, triggering a refresh operation on the element list.
[0006] In some embodiments, after triggering a refresh operation on the element list, the method further includes: adjusting the display height of the refresh presentation element to be reduced to an initial height.
[0007] In some embodiments, the method further includes: during the process of adjusting the display height of the refresh demonstration element, displaying a preset refresh demonstration screen at a corresponding position of the refresh demonstration element on the screen.
[0008] In some embodiments, during the process of adjusting the display height of the refresh demonstration element, a preset refresh demonstration screen is displayed at the corresponding position of the refresh demonstration element on the screen, including: during the process of increasing the display height of the refresh demonstration element, displaying the first refresh demonstration screen at the corresponding position of the refresh demonstration element; during the process of decreasing the display height of the refresh demonstration element, displaying the second refresh demonstration screen at the corresponding position of the refresh demonstration element.
[0009] In some embodiments, the method further includes: in response to the sliding operation ending and the sliding distance of the operation point in the first direction not satisfying the sliding distance condition, adjusting the display height of the refresh presentation element to be reduced to the initial height.
[0010] In some embodiments, determining whether the operation point of the user's current sliding operation on the list of elements displayed on the screen slides in a first direction includes: determining a first sliding distance and a second sliding distance of the operation point on the screen, wherein the first sliding distance is a sliding distance in a first axis, and the second sliding distance is a sliding distance in a second axis; in response to determining that the first sliding distance is greater than the second sliding distance, and the moving direction of the point mapped to the first axis is a first direction, and determining that the operation point slides in the first direction.
[0011] In some embodiments, the method also includes: in response to determining that the first sliding distance is less than the second sliding distance, based on the position of the operating point, performing a sliding operation on the element list in a second direction, wherein the second direction is the moving direction of the operating point mapped to the point on the second axis.
[0012] In some embodiments, the method also includes: in response to determining that the operating point slides in a third direction, performing a sliding operation on the element list in the third direction, wherein the third direction is the opposite direction of the first direction; in response to determining that the operating point slides in the first direction and the target element is not in the target position, performing a sliding operation on the element list in the first direction.
[0013] According to another aspect of an embodiment of the present disclosure, a refresh control device for an element list is provided, the device comprising: a first determination module, for determining whether an operation point of a user's current sliding operation on the element list displayed on the screen slides in a first direction; a second determination module, for determining whether a target element in the element list is in a target position in response to the sliding of the operation point in the first direction; a first adjustment module, for adjusting the display height of a refresh demonstration element in the element list to gradually increase from an initial height based on a sliding distance of the operation point in the first direction in response to the target element being in the target position; and a first refresh module, for triggering a refresh operation on the element list in response to the end of the sliding operation and the sliding distance of the operation point in the first direction satisfying a sliding distance condition.
[0014] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is used to execute the refresh control method of the element list.
[0015] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor executable instructions; and a processor for reading executable instructions from the memory and executing the instructions to implement the above-mentioned refresh control method of the element list.
[0016] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the refresh control method of the above-mentioned element list are implemented.
[0017] Based on the refresh control method, device, computer-readable storage medium, electronic device and computer program product of the element list provided by the above-mentioned embodiments of the present disclosure, when determining that the operation point of the sliding operation on the element list slides in the first direction, it is determined whether the target element in the element list is in the target position. If it is in the target position, based on the sliding distance of the operation point in the first direction, the display height of the refresh demonstration element in the element list is adjusted from the initial height to gradually increase. When the sliding operation ends and the sliding distance meets the sliding distance condition, the refresh operation of the element list is triggered, thereby achieving the effect of setting the sliding refresh at any position in the element list, enriching the refresh demonstration method, making the list refresh demonstration more flexible, and meeting different list design requirements. In addition, the embodiment of the present disclosure directly specifies the refresh demonstration element in the element list, without the need to use the prior art to wrap the element list into a set of layouts to achieve refresh demonstration. In the case of a complex layout of the list, compared with the prior art, the embodiment of the present disclosure does not need to solve the sliding conflict of the complex layout, which reduces the design difficulty of the element list layout, reduces the workload of the element list design, and improves the efficiency of the element list layout design.
[0018] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0020] Figure 1 is a system diagram to which the present disclosure is applicable.
[0021] Figure 2 It is a flowchart of a refresh control method of an element list provided by an exemplary embodiment of the present disclosure.
[0022] Figure 3 It is a schematic diagram of the correspondence between a data source and an element list provided by an exemplary embodiment of the present disclosure.
[0023] Figure 4A It is a schematic diagram of the element list layout in the prior art.
[0024] Figure 4B It is a schematic diagram of an element list layout provided by an exemplary embodiment of the present disclosure.
[0025] Figure 5 It is a flowchart of a refresh control method of an element list provided by another exemplary embodiment of the present disclosure.
[0026] Figure 6 It is a flowchart of a refresh control method of an element list provided by another exemplary embodiment of the present disclosure.
[0027] Figure 7 It is a structural diagram of a refresh control device for an element list provided by an exemplary embodiment of the present disclosure.
[0028] Figure 8 It is a structural diagram of a refresh control device for an element list provided by another exemplary embodiment of the present disclosure.
[0029] Fig. 9 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0031] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0032] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0033] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0034] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0035] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0036] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0038] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0039] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0040] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0041] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0042] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0043] Application Overview
[0044] The sliding list layout design scheme adopted by the prior art usually only allows the demonstration screen of the pull-down refresh operation to appear at the top, which cannot meet the diverse design requirements. In addition, the implementation method of the existing sliding list layout design scheme is relatively complicated. For example, the CoordinatorLayout+AppBarLayout+Behavior solution commonly used in the Android system and wrapped with RecyclerView is more suitable for situations where the layout of the list content is simple and has fewer functions. However, for complex designs such as a slidable list nested in a list, sliding conflicts may occur. In order to make users feel that the multiple sliding lists are a coherent list, it is necessary to solve special situations such as sliding event allocation and Filing (inertial sliding) event allocation, which is difficult to implement and has low efficiency.
[0045] Exemplary Systems
[0046] Figure 1 An exemplary system architecture 100 is shown to which a refresh control method or a refresh control device for an element list according to an embodiment of the present disclosure can be applied.
[0047] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0048] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as search applications, web browser applications, shopping applications, instant messaging tools, etc.
[0049] The terminal device 101 can be various electronic devices including a screen, including but not limited to mobile terminals such as sliding phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
[0050] The server 103 may be a server that provides various services, such as a background server that provides support for various applications installed on the terminal device 101. The background server may send the content in the element list for display to the terminal device 101.
[0051] It should be noted that the refresh control method of the element list provided in the embodiments of the present disclosure is usually executed by the terminal device 101 , and accordingly, the refresh control device of the element list is usually arranged in the terminal device 101 .
[0052] It should be understood that Figure 1 The number of terminal devices, networks and servers in the example is only illustrative. Any number of terminal devices, networks and servers may be provided as required. In the case where the content in the element list does not need to be obtained remotely, the above system architecture may not include a network and a server, but only terminal devices.
[0053] Exemplary Methods
[0054] Figure 2 1 is a flow chart of a refresh control method of an element list provided by an exemplary embodiment of the present disclosure. Figure 1 On the terminal device 101 shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0055] Step 201 : determining whether the operation point of the user's current sliding operation on the element list displayed on the screen slides in a first direction.
[0056] In this embodiment, the electronic device can determine whether the operation point of the user's current sliding operation on the element list displayed on the screen slides in the first direction. The first direction can be any direction, for example, the direction from top to bottom on the screen is the first direction, or the direction from bottom to top can also be the first direction.
[0057] The element list is a list formed by a collection of various contents for display on the screen. The contents in the element list may include various, such as text, images, videos, etc. The sliding operation is used to control the element list to slide in a certain direction in whole or in part. The control of the sliding operation can be completed by moving the operating point, and the operating point can be the point mapped to the screen when the user slides on the screen. For example, the touch point when the user's finger slides on the screen is the operating point; or when the user presses the mouse and drags the mouse to perform a sliding operation, the point where the cursor is located on the screen is mapped to the operating point.
[0058] As an example, assuming that the first direction is from top to bottom, if the user controls the operation point to move from top to bottom by finger touch or mouse click, and the lateral displacement of the operation point is within a preset displacement range, it can be determined that the operation point slides in the first direction.
[0059] Step 202: In response to the operation point sliding in a first direction, determining whether a target element in the element list is at a target position.
[0060] In this embodiment, the electronic device can determine whether the target element in the element list is at the target position when determining that the operation point slides in the first direction. The target element is an arbitrarily specified element in the element list, for example, the target element can be the element at the top of the element list, or can also be the element at the bottom.
[0061] The target position may be any specified position. For example, the target position may be the top of the screen. When the target element is the top element in the element list, if the upper edge of the outline containing the target element coincides with the top of the screen, it can be determined that the target element is at the target position.
[0062] Step 203 , in response to the target element being at the target position, based on the sliding distance of the operation point in the first direction, the display height of the refresh presentation element in the element list is adjusted to gradually increase from the initial height.
[0063] In this embodiment, when determining that the target element is at the target position, the electronic device may adjust the display height of the refresh presentation element in the element list to gradually increase from the initial height based on the sliding distance of the operation point in the first direction.
[0064] Among them, the refresh demonstration element is an element used to demonstrate the refresh operation, and the refresh demonstration element can be an element at any pre-specified position. For example, the refresh demonstration element can be the second element in the element list, that is, the first element located below the top element. The refresh demonstration element has an initial height, and usually, the initial height can be 0, that is, when the user does not refresh by sliding operation, the refresh demonstration element is not displayed on the screen. When executing this step, as the operation point moves, the refresh demonstration element is displayed on the screen and the height gradually increases from 0.
[0065] Usually, each element in the element list corresponds to a data item in a preset data source, and the data item for refreshing the presentation can be specified in advance in the data source. The element list also has a corresponding adapter, which is used to render the data item corresponding to each element and display it at the corresponding position on the screen. Figure 3 As shown, the data items in the data source 301 correspond to the list items (i.e., elements) in the element list 302 one by one, and each list item has a corresponding display style. Data item B is a pull-down refresh item, corresponding to list item 2 (pull-down refresh style) in the element list. When the element list needs to be refreshed, list item 2 displays the pull-down refresh style. The pull-down refresh style of list item B is set by the adapter 303.
[0066] Step 204 : In response to the sliding operation ending and the sliding distance of the operation point in the first direction satisfying the sliding distance condition, a refresh operation on the element list is triggered.
[0067] In this embodiment, the electronic device may trigger a refresh operation on the element list in response to the sliding operation ending and the sliding distance of the operation point in the first direction satisfying the sliding distance condition.
[0068] The electronic device can determine that the sliding operation ends when it detects that the user has performed a certain action, for example, when the user's finger is no longer in contact with the screen, or the mouse button is released, the sliding operation is determined to end.
[0069] The sliding distance condition may be a trigger condition set based on the sliding distance. For example, when the sliding distance is greater than or equal to a preset distance threshold, it is determined that the sliding distance condition is satisfied.
[0070] The object of the refresh operation is usually the entire element list. In some cases, the object of the refresh operation can also be set in advance, for example, before the application is closed, only the elements other than the element at the top of the element list are refreshed.
[0071] The method provided by the above-mentioned embodiment of the present disclosure determines whether the target element in the element list is in the target position when determining that the operation point of the sliding operation on the element list slides in the first direction. If it is in the target position, based on the sliding distance of the operation point in the first direction, the display height of the refresh demonstration element in the element list is adjusted to gradually increase from the initial height. When the sliding operation ends and the sliding distance meets the sliding distance condition, the refresh operation of the element list is triggered, thereby achieving the effect of setting the sliding refresh at any position in the element list, enriching the refresh demonstration method, making the list refresh demonstration more flexible, and meeting different list design requirements. In addition, the embodiment of the present disclosure directly specifies the refresh demonstration element in the element list, without the need to use the prior art to wrap the element list into a set of layouts to achieve refresh demonstration. In the case of a complex layout of the list, compared with the prior art, the embodiment of the present disclosure does not need to solve the sliding conflict of the complex layout, which reduces the design difficulty of the element list layout, reduces the workload of the element list design, and improves the efficiency of the element list layout design.
[0072] refer to Figure 4A , which shows the implementation method of the pull-down refresh element list layout in the existing Android system. Figure 4A As shown, the RecyclerView (i.e., the element list) includes an external RecyclerView (as shown in 4011 in the figure) and an internal nested RecyclerView (as shown in 40111 in the figure). The internal nested RecyclerView includes sublist 1, sublist 2, and sublist 3, and each sublist includes multiple nested list items. The RecyclerView is nested in the CoordinatorLayout (as shown in 401 in the figure) through the SwipeRefreshLayout. The CoordinatorLayout includes the AppBarLayout, which is used to set the elements of the list header (as shown in 4012 in the figure). The configuration of the pull-down refresh demonstration is also implemented through the AppBarLayout.
[0073] refer to Figure 4B , which shows a schematic diagram of an element list provided by an embodiment of the present disclosure. Figure 4B As shown, the RecyclerView (i.e., the element list) includes an outer RecyclerView (as shown in 402 in the figure) and an inner nested RecyclerView (as shown in 4021 in the figure), and the inner nested RecyclerView also includes sublist 1, sublist 2, and sublist 3, each of which includes multiple nested list items. List item 2 is a refresh demonstration element with an initial height of 0 (for pull-down refresh demonstration).
[0074] contrast Figure 4A and Figure 4B It can be seen that the existing element list layout scheme has a complex structure and requires a relatively complex configuration to solve sliding conflicts. However, the element list layout scheme provided by the embodiment of the present disclosure only needs to directly configure the element list and the internally nested sublists, which greatly reduces the complexity of the layout design.
[0075] In some optional implementations, after step 204, the method may further include:
[0076] Adjust the display height of the refresh presentation element to reduce it to its initial height.
[0077] Generally, the process of reducing the display height of the refresh presentation element is set to be a gradual reduction process. The initial height may be 0, that is, the display of the refresh presentation element on the screen gradually disappears.
[0078] This implementation method reduces the display height of the refresh demonstration element to the initial height after the refresh operation is triggered, which can provide a basis for the next refresh operation and dynamically present the complete refresh process to the user, making the list refresh demonstration more flexible.
[0079] In some optional implementations, the method further includes:
[0080] In the process of adjusting the display height of the refresh demonstration element, a preset refresh demonstration picture is displayed at a corresponding position of the refresh demonstration element on the screen.
[0081] The adjustment process of the display height of the refresh presentation element may include a height increase process and a height decrease process. Generally, the data required for refreshing the presentation screen may be stored in a data item corresponding to the refresh presentation element (e.g. Figure 3 The content of the refresh demonstration screen may include various information, such as images, text, symbols, etc. Generally, the refresh demonstration screen may include animated images, so as to make the refresh demonstration process more vivid and smooth.
[0082] This implementation method can make the content of the refresh demonstration richer by displaying the refresh demonstration picture on the screen during the process of adjusting the display height of the refresh demonstration element, which helps to show the refresh process to the user more intuitively, reduce the probability of user error operation, and improve the efficiency of user operation.
[0083] In some optional implementations, the electronic device may display a refresh demonstration screen at a corresponding position of the refresh demonstration element on the screen by performing the following steps:
[0084] When the display height of the refresh demonstration element increases, a first refresh demonstration picture is displayed at the corresponding position of the refresh demonstration element; when the display height of the refresh demonstration element decreases, a second refresh demonstration picture is displayed at the corresponding position of the refresh demonstration element.
[0085] As an example, the first refresh demonstration screen may be a screen showing an icon or text gradually increasing in size, which is used to prompt the user that a refresh operation is about to be initiated; the second refresh demonstration screen may be a screen showing an icon or text gradually decreasing in size, which is used to prompt the user that a refresh operation is in progress.
[0086] This implementation method can more intuitively show the user the process of refreshing and refreshing, reduce the probability of user misoperation, and improve the accuracy of user operation by displaying the first refresh demonstration screen and the second refresh demonstration screen respectively when the display height of the refresh demonstration element changes.
[0087] In some optional implementations, the method further includes:
[0088] In response to the sliding operation ending and the sliding distance of the operation point in the first direction not satisfying the sliding distance condition, the display height of the refresh presentation element is adjusted to be reduced to the initial height.
[0089] As an example, when the user's finger leaves the screen and the sliding distance is less than a preset distance threshold, the display height of the refresh demonstration element will be restored and the refresh operation will not be performed.
[0090] like Figure 5 As shown, it shows a flow chart of this embodiment, and the method may include the following steps:
[0091] Step 501: determine whether the operation point of the user's current sliding operation on the element list displayed on the screen slides in a first direction.
[0092] If yes, execute step 502.
[0093] Step 502: Determine whether the target element in the element list is at the target position.
[0094] If yes, execute step 503.
[0095] Step 503: Based on the sliding distance of the operation point in the first direction, the display height of the refresh presentation element in the element list is adjusted to gradually increase from the initial height.
[0096] Step 504, determining whether the sliding operation is completed.
[0097] If yes, execute step 505.
[0098] Step 505: Determine whether the sliding distance of the operating point in the first direction satisfies a sliding distance condition.
[0099] If yes, execute step 506, otherwise execute step 507.
[0100] Step 506, triggering a refresh operation on the element list.
[0101] Step 507: adjust the display height of the refresh presentation element to reduce it to the initial height.
[0102] The execution process of the above steps 501 to 506 is the same as the above steps 201 to 204, which will not be repeated here. Step 507 is the step provided in this embodiment.
[0103] This implementation method can be implemented so that when a user performs a sliding operation, if he does not want to perform a refresh operation, he can shorten the sliding distance and end the sliding operation by actively moving the position of the operation point; or the user may trigger a refresh demonstration element to be displayed on the screen due to an error in the sliding operation, but the refresh operation is not triggered because the sliding distance condition is not met, thereby helping to reduce the probability of user error operations and avoid the waste of software and hardware resources (such as network resources, processor resources, etc.) caused by error operations.
[0104] In some optional implementations, such as Figure 6 As shown, step 201 may include:
[0105] Step 2011: determining a first sliding distance and a second sliding distance of an operation point on the screen.
[0106] The first sliding distance is the sliding distance in the first axis, and the second sliding distance is the sliding distance in the second axis. As an example, the first axis may be a direction from top to bottom or from bottom right to top on the screen, that is, a longitudinal direction. The second axis may be a direction from left to right or from right to left, that is, a transverse direction. The electronic device may determine the longitudinal sliding distance (first sliding distance) and the transverse sliding distance (second sliding distance) in real time during the movement of the operating point.
[0107] Usually, the upper left corner of the screen is the coordinate origin, the positive direction of the x-axis is to the right, and the positive direction of the y-axis is downward. The first sliding distance can be obtained by determining the change in the y-coordinate component of the operating point, and the second sliding distance can be obtained by determining the change in the x-coordinate component of the operating point.
[0108] Step 2012: In response to determining that the first sliding distance is greater than the second sliding distance, and the moving direction of the point mapped from the operating point to the first axial direction is the first direction, determine that the operating point slides in the first direction.
[0109] For example, the first direction is set to the vertical downward direction of the screen. When the distance the user's finger slides vertically downward on the screen (that is, the moving distance of the finger's touch point on the screen mapped to the point on the first axis) is greater than the horizontal sliding distance (that is, the moving distance of the finger's touch point on the screen mapped to the point on the second axis), it is determined that the operation point slides in the first direction.
[0110] This implementation can more accurately determine whether the operation point slides in the first direction by comparing the first sliding distance and the second sliding distance, thereby improving the accuracy of triggering the refresh operation.
[0111] In some optional implementations, the method further includes:
[0112] In response to determining that the first sliding distance is less than the second sliding distance, based on the position of the operation point, a sliding operation of sliding in a second direction is performed on the element list, wherein the second direction is a moving direction of the operation point mapped to a point on the second axis. For example, the second direction is a horizontal direction of the screen, which may be a moving direction of the operation point from left to right or from right to left.
[0113] Specifically, Figure 4B As shown, the element list may include nested sublists. If the position of the operation point is within the display range of the sublist, a horizontal sliding operation may be performed on the sublist. Alternatively, if the position of the operation point is outside the display range of the sublist, or the element list does not contain a sublist, the horizontal sliding operation is invalid, or the horizontal sliding operation controls the horizontal movement of the entire element list.
[0114] This implementation method can effectively avoid sliding conflicts caused by sliding operations in different directions by performing a sliding operation on the element list in the second direction when the first sliding distance is smaller than the second sliding distance, thereby reducing the workload of handling sliding conflicts when designing the layout of the element list, improving the efficiency of designing the element list, and improving the accuracy of the user's sliding operation.
[0115] In some optional implementations, the method may further include:
[0116] In response to determining that the operating point slides in a third direction, a sliding operation of sliding in the third direction is performed on the element list, wherein the third direction is the opposite direction of the first direction.
[0117] As an example, when the first direction is the vertical downward direction, the third direction is the vertical upward direction. The sliding operation of sliding in the third direction is generally to control the entire or part of the element list (such as the case of controlling the sliding of a sublist) to slide in the third direction.
[0118] In response to determining that the operating point slides in the first direction and the target element is not at the target position, a sliding operation of sliding in the first direction is performed on the element list.
[0119] As an example, assuming that the target position is the top of the screen, when the target element is the element at the top of the element list, if the upper edge of the outline containing the target element does not coincide with the top of the screen, it can be determined that the target element is not at the target position. At this time, as the operating point slides, the element list slides in the first direction (for example, vertically downward).
[0120] The sliding operation scheme provided by this implementation method realizes richer sliding operations on the element list, further improves the flexibility of sliding operations on the element list, and helps to increase the diversity of user operations.
[0121] Exemplary Devices
[0122] Figure 7 is a schematic diagram of a refresh control device for an element list provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as Figure 7 As shown, the refresh control device for the element list includes: a first determination module 701, used to determine whether the operation point of the user's current sliding operation on the element list displayed on the screen slides in the first direction; a second determination module 702, used to determine whether the target element in the element list is in the target position in response to the sliding of the operation point in the first direction; a first adjustment module 703, used to adjust the display height of the refresh demonstration element in the element list from the initial height to gradually increase based on the sliding distance of the operation point in the first direction in response to the target element being in the target position; a first refresh module 704, used to trigger the refresh operation of the element list in response to the end of the sliding operation and the sliding distance of the operation point in the first direction meeting the sliding distance condition.
[0123] In this embodiment, the first determination module 701 can determine whether the operation point of the user's current sliding operation on the element list displayed on the screen slides in the first direction. The first direction can be any direction, for example, the direction from top to bottom on the screen is the first direction, or the direction from bottom to top can also be the first direction.
[0124] The element list is a list formed by a collection of various contents for display on the screen. The contents in the element list may include various, such as text, images, videos, etc. The sliding operation is used to control the element list to slide in a certain direction in whole or in part. The control of the sliding operation can be completed by moving the operating point, and the operating point can be the point mapped to the screen when the user slides on the screen. For example, the touch point when the user's finger slides on the screen is the operating point; or when the user presses the mouse and drags the mouse to perform a sliding operation, the point where the cursor is located on the screen is mapped to the operating point.
[0125] As an example, assuming that the first direction is from top to bottom, if the user controls the operation point to move from top to bottom by finger touch or mouse click, and the lateral displacement of the operation point is within a preset displacement range, it can be determined that the operation point slides in the first direction.
[0126] In this embodiment, the second determination module 702 can determine whether the target element in the element list is at the target position when determining that the operating point slides in the first direction. The target element is an arbitrarily specified element in the element list, for example, the target element can be the element at the top of the element list, or can also be the element at the bottom.
[0127] The target position may be any specified position. For example, the target position may be the top of the screen. When the target element is the top element in the element list, if the upper edge of the outline containing the target element coincides with the top of the screen, it can be determined that the target element is at the target position.
[0128] In this embodiment, when determining that the target element is at the target position, the first adjustment module 703 may adjust the display height of the refresh presentation element in the element list to gradually increase from the initial height based on the sliding distance of the operation point in the first direction.
[0129] Among them, the refresh demonstration element is an element used to demonstrate the refresh operation, and the refresh demonstration element can be an element at any pre-specified position. For example, the refresh demonstration element can be the second element in the element list, that is, the first element located below the top element. The refresh demonstration element has an initial height, and usually, the initial height can be 0, that is, when the user does not refresh by sliding operation, the refresh demonstration element is not displayed on the screen. When executing this step, as the operation point moves, the refresh demonstration element is displayed on the screen and the height gradually increases from 0.
[0130] In this embodiment, the first refresh module 704 may trigger a refresh operation on the element list in response to the sliding operation ending and the sliding distance of the operation point in the first direction satisfying the sliding distance condition.
[0131] The first refresh module 704 may determine that the sliding operation ends when it detects that the user has performed a certain action, for example, when the user's finger is no longer in contact with the screen or the mouse button is released, the sliding operation ends.
[0132] The sliding distance condition may be a trigger condition set based on the sliding distance. For example, when the sliding distance is greater than or equal to a preset distance threshold, it is determined that the sliding distance condition is satisfied.
[0133] The object of the refresh operation is usually the entire element list. In some cases, the object of the refresh operation can also be set in advance, for example, before the application is closed, only the elements other than the element at the top of the element list are refreshed.
[0134] Reference Figure 8 , Figure 8 It is a structural diagram of a refresh control device for an element list provided by another exemplary embodiment of the present disclosure.
[0135] In some optional implementations, the device further includes: a second adjustment module 705, configured to adjust the display height of the refresh presentation element to be reduced to an initial height.
[0136] In some optional implementations, the device further includes: a display module 706, configured to display a preset refresh demonstration screen at a corresponding position of the refresh demonstration element on the screen during the process of adjusting the display height of the refresh demonstration element.
[0137] In some optional implementations, the display module 706 includes: a first display unit 7061, used to display a first refresh demonstration screen at a corresponding position of the refresh demonstration element when the display height of the refresh demonstration element increases; a second display unit 7062, used to display a second refresh demonstration screen at a corresponding position of the refresh demonstration element when the display height of the refresh demonstration element decreases.
[0138] In some optional implementations, the device further includes: a third adjustment module 707, configured to adjust the display height of the refresh presentation element to an initial height in response to the sliding operation ending and the sliding distance of the operation point in the first direction not satisfying the sliding distance condition.
[0139] In some optional implementations, the first determination module 701 includes: a first determination unit 7011, used to determine a first sliding distance and a second sliding distance of the operation point on the screen, wherein the first sliding distance is a sliding distance on a first axis, and the second sliding distance is a sliding distance on a second axis; a second determination unit 7012, used to determine that the operation point slides in the first direction in response to determining that the first sliding distance is greater than the second sliding distance, and the moving direction of the operation point mapped to the point on the first axis is a first direction.
[0140] In some optional implementations, the device also includes: a first control module 708, which is used to perform a sliding operation on the element list in a second direction based on the position of the operation point in response to determining that the first sliding distance is less than the second sliding distance, wherein the second direction is the moving direction of the point mapped from the operation point to the second axis.
[0141] In some optional implementations, the device also includes: a second control module 709, which is used to perform a sliding operation on the element list in the third direction in response to determining that the operating point slides in the third direction, wherein the third direction is the opposite direction of the first direction; and a third control module 710, which is used to perform a sliding operation on the element list in the first direction in response to determining that the operating point slides in the first direction and the target element is not in the target position.
[0142] The refresh control device for the element list provided by the above-mentioned embodiment of the present disclosure determines whether the target element in the element list is in the target position when determining that the operation point of the sliding operation on the element list slides in the first direction. If it is in the target position, based on the sliding distance of the operation point in the first direction, the display height of the refresh demonstration element in the element list is adjusted to gradually increase from the initial height. When the sliding operation ends and the sliding distance meets the sliding distance condition, the refresh operation of the element list is triggered, thereby achieving the effect of setting the sliding refresh at any position in the element list, enriching the refresh demonstration method, making the list refresh demonstration more flexible, and meeting different list design requirements. In addition, the embodiment of the present disclosure directly specifies the refresh demonstration element in the element list, without the need to use the prior art to wrap the element list into a set of layouts to achieve refresh demonstration. In the case of a complex layout of the list, compared with the prior art, the embodiment of the present disclosure does not need to solve the sliding conflict of the complex layout, which reduces the design difficulty of the element list layout, reduces the workload of the element list design, and improves the efficiency of the element list layout design.
[0143] Exemplary Electronic Devices
[0144] Below, reference Fig. 9 To describe an electronic device according to an embodiment of the present disclosure. The electronic device may be as follows Figure 1 Any one or both of the terminal device 101 and the server 103 shown, or a stand-alone device independent of them, the stand-alone device can communicate with the terminal device 101 and the server 103 to receive the collected input signals from them.
[0145] Fig. 9 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.
[0146] like Fig. 9 As shown, the electronic device 900 includes one or more processors 901 and a memory 902 .
[0147] The processor 901 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 900 to perform desired functions.
[0148] The memory 902 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 901 may run the program instructions to implement the refresh control method of the element list of each embodiment of the present disclosure above and / or other desired functions. Various contents such as data items corresponding to elements in the element list may also be stored in the computer-readable storage medium.
[0149] In one example, the electronic device 900 may further include: an input device 903 and an output device 904 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0150] For example, when the electronic device is a terminal device 101 or a server 103, the input device 903 may be a touch screen, a mouse, a keyboard, or other devices for inputting operation instructions. When the electronic device is a stand-alone device, the input device 903 may be a communication network connector for receiving input operation instructions from the terminal device 101 and the server 103.
[0151] The output device 904 can output various information to the outside, including a list of displayed elements. The output device 904 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0152] Of course, to simplify, Fig. 9 Only some of the components related to the present disclosure in the electronic device 900 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 900 may also include any other appropriate components.
[0153] Exemplary computer program products and computer-readable storage media
[0154] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the refresh control method of the element list according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0155] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0156] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, causes the processor to execute the steps of the refresh control method of the element list according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0157] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0158] Exemplary Computer Programs
[0159] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the refresh control method of the element list in any possible implementation manner described above can be implemented.
[0160] The computer program product may be implemented in hardware, software or a combination thereof. In one optional example, the computer program product is embodied as a computer storage medium, and in another optional example, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0161] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0162] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0163] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0164] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0165] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0166] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0167] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A refresh control method for an element list, comprising: Determining whether an operation point of a current sliding operation of a user on a list of elements displayed on a screen slides in a first direction; In response to the operating point sliding in the first direction, determining whether a target element in the element list is at a target position; In response to the target element being at the target position, adjusting the display height of a refresh demonstration element in the element list to gradually increase from an initial height based on the sliding distance of the operation point in the first direction, the refresh demonstration element being an element used to demonstrate a refresh operation; In response to the sliding operation ending and the sliding distance of the operation point in the first direction satisfying a sliding distance condition, a refresh operation on the element list is triggered.
2. The method according to claim 1, wherein: After the triggering of the refresh operation on the element list, the method further includes: The display height of the refresh presentation element is adjusted to be reduced to the initial height.
3. The method according to claim 1, wherein: The method further comprises: In response to the sliding operation ending and the sliding distance of the operation point in the first direction not satisfying the sliding distance condition, adjusting the display height of the refresh presentation element to be reduced to an initial height.
4. The method according to claim 2 or 3, wherein: The method further comprises: In the process of adjusting the display height of the refresh demonstration element, a preset refresh demonstration picture is displayed at a corresponding position of the refresh demonstration element on the screen.
5. The method according to claim 4, wherein: In the process of adjusting the display height of the refresh demonstration element, displaying a preset refresh demonstration screen at a corresponding position of the refresh demonstration element on the screen includes: In the process of increasing the display height of the refresh demonstration element, displaying a first refresh demonstration picture at a corresponding position of the refresh demonstration element; In the process of reducing the display height of the refresh demonstration element, a second refresh demonstration picture is displayed at a corresponding position of the refresh demonstration element.
6. The method according to claim 1, wherein: The determining whether the operation point of the current sliding operation of the user on the element list displayed on the screen slides in the first direction includes: Determining a first sliding distance and a second sliding distance of the operation point on the screen, wherein the first sliding distance is a sliding distance in a first axial direction, and the second sliding distance is a sliding distance in a second axial direction; In response to determining that the first sliding distance is greater than the second sliding distance and the moving direction of the point mapped from the operating point to the first axial direction is a first direction, determining that the operating point slides in the first direction.
7. The method according to claim 6, wherein: The method further comprises: In response to determining that the first sliding distance is less than the second sliding distance, based on the position of the operating point, a sliding operation is performed on the element list in a second direction, wherein the second direction is a moving direction of the point mapped from the operating point to the second axis.
8. The method according to claim 1, wherein: The method further comprises: In response to determining that the operation point slides in a third direction, performing a sliding operation on the element list in the third direction, wherein the third direction is the opposite direction of the first direction; In response to determining that the operation point slides in the first direction and the target element is not at the target position, a sliding operation of sliding in the first direction is performed on the element list.
9. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 8.
10. A computer program product, comprising a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
