View display method, device and storage medium
By adjusting the display area according to the sliding event in the list view, the problem of single long graphics and text display methods is solved, and rich user interaction experience and diverse display methods are achieved.
Patent Information
- Application Number
- CN202110493008.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-06
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-05-06
AI Technical Summary
In the prior art, the display method of long pictures and texts is single, and the user experience is not rich. Sliding operations can only be performed within the display area of long pictures and texts, which limits the user's interactive experience.
By displaying the first list view unit in the first area of the list view in the display screen, and determining the second area of the list view according to the sliding distance and target size of the sliding event, adjusting the target area of the scroll view, the long picture and text are realized The sliding display enriches the display method.
It realizes dynamic adjustment of the display area according to the sliding distance and target size of the sliding event when displaying long pictures and texts, enhancing the user's interactive experience and diversity of display methods.
Smart Images

Figure CN114675911B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a view display method, device and storage medium. Background Art
[0002] With the rapid development of computer technology, view display devices can simultaneously display multiple contents such as pictures and texts in the form of list views; when long images and texts are displayed through list views, the long images and texts can usually only be displayed by sliding when a sliding event for the long images and texts is detected in the display area of the long images and texts, that is, the user can slide the long images and texts only when the sliding operation is performed in the display area of the long images and texts. The existing display methods for long images and texts are relatively simple, resulting in a simple user experience. Summary of the invention
[0003] The embodiments of the present application provide a view display method, device and storage medium, which can enrich the display mode of long images and texts.
[0004] On the one hand, an embodiment of the present application provides a view display method, including:
[0005] Displaying a first list view unit located in a first area of a list view on a display screen, wherein the list view includes at least one list view unit, a target list view unit including a scroll view exists in the at least one list view unit, a size of the scroll view is larger than a size of the target list view unit, and the first area matches a target size of a displayable area on the display screen;
[0006] If there is a sliding event for the list view, determining a second area of the list view according to a sliding distance corresponding to the sliding event and the target size;
[0007] Determine the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and adjust the target list view unit to obtain an adjusted target list view unit, wherein the adjusted target list view unit includes the content located in the target area of the scroll view;
[0008] A second list view unit located in a second area of the list view is displayed in the display screen, the second list view unit including the adjusted target list view unit.
[0009] On the one hand, an embodiment of the present application provides a view display device, which includes a display unit and a processing unit, and the display unit and the processing unit are used to implement the above-mentioned view display method.
[0010] On the one hand, an embodiment of the present application provides a view display device, characterized in that the view display device includes an input interface and an output interface, and further includes:
[0011] a processor adapted to implement one or more instructions; and,
[0012] A computer storage medium storing one or more instructions, wherein the one or more instructions are suitable for being loaded by the processor and executing the above-mentioned view display method.
[0013] On the one hand, an embodiment of the present application provides a computer storage medium, characterized in that computer program instructions are stored in the computer storage medium, and when the computer program instructions are executed by a processor, they are used to execute the above-mentioned view display method.
[0014] On the one hand, an embodiment of the present application provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a view display device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, which, when executed by the processor, are used to execute the above-mentioned view display method.
[0015] In an embodiment of the present application, a view display device displays a first list view unit located in a first area of a list view in its display screen, wherein the list view includes at least one list view unit, and there is a target list view unit including a scrolling view in at least one list view unit, the size of the scrolling view is larger than the size of the target list view unit, and the first area matches the target size of the displayable area in the display screen; if there is a sliding event for the list view, the second area of the list view is determined according to the sliding distance and the target size corresponding to the sliding event; the target area of the scrolling view is determined according to the sliding distance and the size of the target list view unit in the second area, and the target list view unit is adjusted to obtain an adjusted target list view unit, and the adjusted target list view unit includes the content located in the target area of the scrolling view; the second list view unit located in the second area of the list view is displayed on the display screen, and the second list view unit includes the adjusted target list view unit. When there is a sliding event for the list view, the view display device can not only determine the second area of the list view according to the sliding distance and the target size corresponding to the sliding event, and display the second list view unit located in the second area of the list view to realize the sliding display of the list view; but also can determine the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and display the content located in the target area of the scroll view to realize the sliding display of the scroll view, that is, the sliding display of the scroll view can be realized according to the sliding event for the list view; and because the size of the scroll view is larger than the size of the target list view unit, it represents that when the scroll view is a long image and text, the sliding display of the long image and text can be realized according to the sliding event for the list view, thereby enriching the display method of the long image and text. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 is a structural schematic diagram of a view display system provided in an embodiment of the present application;
[0018] Figure 2a is a schematic diagram of the relationship between content data and list view units provided in an embodiment of the present application;
[0019] Figure 2b is a schematic diagram of a list view provided by an embodiment of the present application when it is fully displayed;
[0020] Figure 2c is a schematic diagram of a displayable area in a display screen provided in an embodiment of the present application;
[0021] Figure 2d It is a schematic diagram of displaying a list view based on a displayable area in a list view control provided by an embodiment of the present application;
[0022] Figure 3 It is a flowchart of a view display method provided in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of displaying a first list view unit provided by an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a list view sliding display provided in an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of an absolute offset distance of a scroll view provided in an embodiment of the present application;
[0026] Figure 7a is a schematic diagram of an initial offset distance of a target list view unit provided in an embodiment of the present application;
[0027] Figure 7b is a schematic diagram of another initial offset distance of a target list view unit provided in an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of determining a target area of a scroll view provided by an embodiment of the present application;
[0029] Figure 9a is a schematic diagram of performing a first sliding operation on a list view provided by an embodiment of the present application;
[0030] Figure 9b is a schematic diagram of performing a second sliding operation on a list view provided by an embodiment of the present application;
[0031] Fig.9c is a schematic diagram of performing a third sliding operation on a list view provided by an embodiment of the present application;
[0032] Figure 9d is a schematic diagram of performing a fourth sliding operation on a list view provided by an embodiment of the present application;
[0033] Fig.10 is a flowchart of another view display method provided in an embodiment of the present application;
[0034] Fig.11It is a flowchart of an execution view display method provided in an embodiment of the present application;
[0035] Fig.12 is a structural schematic diagram of a view display device provided in an embodiment of the present application;
[0036] Fig.13 It is a structural schematic diagram of a view display device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] An embodiment of the present application provides a view display scheme, which can determine the target area of the scrolling view according to the sliding distance corresponding to the sliding event of the list view and the size of the target list view unit in the second area of the list view, and display the content located in the target area of the scrolling view to realize the sliding display of the scrolling view, wherein the target list view unit is a list view unit in the list view that includes the scrolling view, and the second area of the list view is the area for sliding display of the list view determined according to the sliding event of the list view.
[0039] Based on the above view display solution, the present application embodiment provides a view display system. Figure 1 , which is a structural diagram of a view display system provided in an embodiment of the present application. Figure 1 The view display system shown may include a view display device 101 and a server 102. The view display device 101 may include any one or more of a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart car-mounted device, and a smart wearable device. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The view display device 101 and the server 102 may be directly or indirectly connected in communication via wired or wireless communications, which is not limited in this application.
[0040] In one embodiment, after detecting a display trigger event for a list view, the view display device 101 sends a content data request to the server 102; after receiving the content data request, the server 102 sends at least one content data to the view display device 101; after the view display device 101 receives the at least one content data sent by the server 102, the at least one content data can be displayed in the form of a list view on the display screen of the view display device 101, wherein the content data can be pictures, text, graphics, etc.
[0041] In one embodiment, the view display device 101 can display different content data based on different list view unit controls, and the part of a content data displayed by the list view unit control corresponding to the content data is a list view unit. Figure 2a As shown, it is a schematic diagram of the relationship between a content data and a list view unit provided in an embodiment of the present application. If a scroll view exists in at least one content data received by the view display device 101, and the size of the scroll view is larger than the size of the list view unit control, that is, the size of the scroll view when fully displayed is larger than the size of the list view unit control, then the scroll view will be partially displayed based on the list view unit control. Assuming that the scroll view is a picture, if the scroll view is fully displayed as shown in the mark 201, the content in the scroll view displayed when the scroll view is displayed based on the list view unit control is the list view unit corresponding to the scroll view. If the width of the list view unit control is the same as the width of the scroll view, and the height of the list view unit control is smaller than the height of the scroll view, then the list view unit corresponding to the scroll view can be as shown in the mark 202. Further, a scroll view control can be embedded in the list view unit control, and a scroll view larger than the list view unit control can be slid and displayed based on the scroll view control, so as to realize the sliding display of the scroll view larger than the list view unit control based on the list view unit control.
[0042] In one embodiment, the list view includes at least one list view unit, and the list view units in the list view are arranged in a certain order, for example, they can be arranged from top to bottom in a certain order. Optionally, the arrangement order of the list view units can be the same as the time sequence of the content data received by the view display device 101. Optionally, the content data sent by the server 102 can also carry sequence indication information indicating the arrangement order of the content data, and the arrangement order of the list view units can be determined by the sequence indication information of the content data corresponding to the list view units. Figure 2bAs shown, it is a schematic diagram of a list view provided in an embodiment of the present application when it is fully displayed. If the 8 content data received by the view display device 101 are arranged in the order of content data 1, content data 2, content data 3, content data 4, content data 5, content data 6, content data 7 and content data 8; the list view units corresponding to the 8 content data are list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8 respectively, then the list view can be as shown in the mark 211.
[0043] Further, the view display device 101 can display the list view based on the list view control, and further, the displayable area of the list view in the list view control can be determined by setting the padding of the list view, wherein the padding of the list view indicates the distance between the top of the displayable area of the list view in the list view control and the top of the list view control, wherein the size of the list view control and the padding of the list view can be set according to different requirements. In an application scenario, if the page displaying the list view includes a top navigation bar and a bottom navigation bar, the height of the list view control can be set to the screen height of the display screen of the view display device 101 minus the height of the top navigation bar and the height of the bottom navigation bar, the width of the list view control can be set to the width of the display screen, and the padding of the list view can be set to 0, and the list view can be displayed based on the list view control starting at a position that is the height of the top navigation bar away from the top of the display screen, then the displayable area of the list view in the display screen can be as follows. Figure 2c As shown in the mark 221, Figure 2c A schematic diagram of a displayable area in a display screen provided in an embodiment of the present application, the top navigation bar may be shown as 222, and the bottom navigation bar may be shown as 223. Optionally, the height of the list view control may be set to the screen height of the display screen of the view display device 101 minus the height of the bottom navigation bar, and the inner margin of the list view may be set to the height of the top navigation bar, and the list view may be displayed based on the list view control from the top position of the display screen, and the display area of the list view in the display screen may be the same as that of the top navigation bar. Figure 2c The area indicated by the mark 221 is the same.
[0044] For example, if Figure 2dAs shown, it is a schematic diagram of displaying a list view based on a displayable area in a list view control provided in an embodiment of the present application. Assuming that the list view is fully displayed as shown by mark 231, the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8. Then, when the list view is displayed based on the displayable area in the list view control, the content of the list view displayed may be as shown by mark 232, and the content of the list view as shown by mark 233 is not displayed.
[0045] Based on the above view display scheme and view display system, the present application embodiment provides a view display method. Figure 3 , which is a flow chart of a view display method provided in an embodiment of the present application. Figure 3 The view display method shown can be executed by a view display device. Figure 3 The view display method shown may include the following steps:
[0046] S301: Display a first list view unit in a first area of a list view on a display screen.
[0047] Among them, the list view includes at least one list view unit; the first list view unit is a list view unit located in the first area of the list view; the view display device displays the first list view unit located in the first area of the list view in its display screen, which means that the first list view unit located in the first area of the list view is displayed in the displayable area in the display screen, that is, the first list view unit located in the first area of the list view is displayed through the display screen based on the displayable area in the list view control; the first area of the list view matches the target size of the displayable area in the display screen, the target size of the displayable area in the display screen is the same as the size of the displayable area in the list view control, and the first area of the list view is any area in the list view that matches the target size.
[0048] Among them, there is a target list view unit including a scroll view in at least one list view unit, and the size of the scroll view is larger than the size of the target list view unit, that is, the size of the scroll view is larger than the size of the target list view unit control. Optionally, the scroll view can be a picture, text, or graphic.
[0049] For example, if Figure 4As shown, a schematic diagram of displaying a first list view unit provided in an embodiment of the present application is provided. Assuming that the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8, assuming that the size of each list view unit is the same, the displayable area in the list view control can display 4 complete list view units, that is, the displayable area in the display screen can display 4 complete list view units. In an application scenario, the first list view unit displayed by the view display device can be list view unit 1, list view unit 2, list view unit 3 and list view unit 4 as indicated by the mark 401. At this time, the first list view unit displayed is the default list display unit of the list view. The default list view unit refers to: the list view unit displayed when the view display device displays the list view for the first time after detecting a display trigger operation for the list view. In another application scenario, the first list view unit displayed by the view display device may also be the remaining list view units, for example, as shown in mark 402, in which case the first list view unit is list view unit 3, list view unit 4, list view unit 5 and list view unit 6.
[0050] In one embodiment, the target list view unit including the scroll view may be a list view unit included in an area outside the first area of the list view, or may be a list view unit included in the first area of the list view; when the target list view unit is not in the first area, the view display device will not display the target list view unit when displaying the first list view unit located in the first area of the list view on its display screen; when the target list view unit is in the first area, the view display device will display the target list view unit when displaying the first list view unit located in the first area of the list view on its display screen. For example, assuming that the first list view unit displayed by the view display device is the default list view unit of the list view, that is, the list view unit as indicated by the mark 401, including list view unit 1, list view unit 2, list view unit 3, and list view unit 4; assuming that the target list view unit is list view unit 7, then the target list view unit will not be displayed at this time; assuming that the target list view unit is list view unit 3, then the target list view unit will be displayed at this time.
[0051] S302: If there is a sliding event for the list view, determine a second area of the list view according to a sliding distance and a target size corresponding to the sliding event.
[0052] In one embodiment, if there is a sliding event for a list view, the absolute offset distance of the list view is determined according to the sliding distance corresponding to the sliding event, and then the second area of the list view is determined according to the absolute offset distance of the list view and the target size. The absolute offset distance of the list view is positively correlated with the sliding distance, and the absolute offset distance of the list view indicates the offset between the second area of the list view and the third area of the list view, wherein the third area of the list view is an area including a default list view unit, that is, the area corresponding to the list view unit displayed when the view display device first displays the list view after detecting a display trigger operation for the list view. At this time, the first list view unit located in the third area is the first list view unit in the list view, and the absolute offset distance of the list view is zero. Specifically, the absolute offset distance of the list view can be characterized by the difference between the top of the content actually displayed in the displayable area of the list view and the position indicated in the list view and the top of the list view. For example, assuming that the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8, assuming that the size of each list view unit is the same, and the displayable area can display 4 complete list view units, if the top of the content actually displayed in the list view in the displayable area is exactly the top of list view unit 2, then the absolute offset distance of the list view is the difference between the top position of list view unit 2 and the top position of the list view, specifically the height of list view unit 1. In a specific implementation, the view display device can create a processing center, and the processing center can implement monitoring of sliding events for the list view based on key-value-observation (KVO) of objects in the observer mode. Specifically, the absolute offset distance of the list view can be obtained by monitoring the sliding distance corresponding to the sliding event. After obtaining the absolute offset distance of the list view, the position indicated by the absolute offset distance of the list view in the list view is determined as the boundary of the second area of the list view, and the area below the boundary with the same size as the target is determined as the second area of the list view. For example, if Figure 5As shown, it is a schematic diagram of a list view sliding display provided by an embodiment of the present application. It is assumed that the first list view unit displayed by the view display device in the displayable area is the default list view unit of the list view, specifically as indicated by the mark 501, including list view unit 1, list view unit 2, list view unit 3 and list view unit 4, assuming that the size of each list view unit is the same. If the user performs a sliding operation on the list view and slides up by a distance equal to the sum of the heights of the three list view units, the absolute offset distance of the list view is the distance equal to the sum of the heights of the three list view units, and the list view units displayed in the displayable area after the sliding are as indicated by the mark 502, including list view unit 4, list view unit 5, list view unit 6 and list view unit 7.
[0053] S303: Determine a target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and adjust the target list view unit to obtain an adjusted target list view unit.
[0054] The adjusted target list view unit includes the content located in the target area of the scroll view.
[0055] In one embodiment, the view display device determines the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, which may include: determining the absolute offset distance of the scroll view according to the sliding distance, the absolute offset distance of the scroll view is positively correlated with the sliding distance; determining the target area of the scroll view according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area. The absolute offset distance of the scroll view indicates the distance between the top of the content portion that can be displayed and the top of the scroll view when the scroll view is displayed in the target list view unit control. For example, Figure 6 As shown, it is a schematic diagram of the absolute offset distance of a scroll view provided in an embodiment of the present application. If the scroll view is fully displayed as shown by mark 601, if the scroll view is displayed in a target list view unit control, the content part that can be displayed is shown by mark 602, and the absolute offset distance of the scroll view is shown by mark 603.
[0056] In one embodiment, the view display device determines the absolute offset distance of the scroll view according to the sliding distance, which may include: determining the absolute offset distance of the list view according to the sliding distance, and determining the absolute offset distance of the scroll view according to the absolute offset distance of the list view and the initial offset distance of the target list view unit. The absolute offset distance of the list view is positively correlated with the sliding distance, and the initial offset distance of the target list view unit indicates the offset of the position of the target list view unit in the list view relative to any position in the third area of the list view, wherein the first list view unit located in the third area is the first list view unit in the list view, and the absolute offset distance of the list view is zero when the list view unit located in the third area is displayed on the display screen. In one embodiment, the initial offset distance of the target list view may be the distance between the position indicated by the bottom of the target list view unit and the position indicated by the bottom of the third area, and if the target list view unit is a list view unit included in an area outside the third area, the initial offset distance of the target list view is a positive value, and if the target list view unit is a list view unit included in the third area, the initial offset distance of the target list view is a negative value. In a specific implementation, the initial offset distance of the target list view unit can be represented by the result of subtracting the height of the third area from the distance between the bottom of the target list view unit and the top of the list view. Optionally, when the sizes of the list view units in the list view are the same, the initial offset distance of the target list view unit can be given by the following formula (1):
[0057] beginOffset=index×h-h1 (1)
[0058] Among them, beginOffset is the initial offset distance of the target list view unit, index is the arrangement order of the target list view unit in the list view, that is, the target list view unit is the nth list view unit in the list view, h is the height of the target list view unit, and h1 is the height of the third area.
[0059] For example, if Figure 7aAs shown, it is a schematic diagram of the initial offset distance of a target list view unit provided in an embodiment of the present application. If the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8, the third area of the list view is shown as marked 701. Assuming that the target list view unit is list view unit 7, the initial offset distance of the target list view unit is shown as marked 702. The initial offset distance of the target list view unit is the sum of the heights of list view unit 5, list view unit 6 and list view unit 7. If the size of each list view unit is the same as h, then the initial offset distance of the target list view unit is 3h, specifically 7×h-4h. Figure 7b As shown, it is a schematic diagram of the initial offset distance of another target list view unit provided in an embodiment of the present application. If the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8, the third area of the list view is indicated by mark 711. Assuming that the target list view unit is list view unit 3, the initial offset distance of the target list view unit is indicated by mark 712. The initial offset distance of the target list view unit is the opposite of the height of list view unit 4. If the size of each list view unit is the same as h, then the initial offset distance of the target list view unit is -h, specifically 3×h-4h.
[0060] In one embodiment, the view display device determines the absolute offset distance of the scrolling view based on the absolute offset distance of the list view and the initial offset distance of the target list view unit, which may include: determining the distance difference between the absolute offset distance of the list view and the initial offset distance of the target list view unit; determining the absolute offset distance of the scrolling view based on the distance difference, and the absolute offset distance of the scrolling view is positively correlated with the distance difference.
[0061] In a specific implementation, the view display device may predetermine the proportional relationship between the size of the scroll view and the target size, and then map the distance difference based on the proportional relationship to obtain the absolute offset distance of the scroll view. In a specific implementation, the view display device determines the proportional relationship between the size of the scroll view and the target size according to the height of the scroll view and the height of the target size of the displayable area. For example, if the proportional relationship between the size of the scroll view and the target size is 1:1, the absolute offset distance of the scroll view and the distance difference are mapped in 1:1, that is, the absolute offset distance of the scroll view is the same as the distance difference; if the proportional relationship between the size of the scroll view and the target size is N:1, N is any real number greater than 1, then the absolute offset distance of the scroll view and the distance difference are mapped in N:1, that is, if the distance difference is 1, the absolute offset distance of the scroll view obtained is N. Among them, mapping the distance difference based on the proportional relationship between the size of the scroll view and the target size can well perform proportional sliding display on a scroll view whose size is larger than the target size of the displayable area.
[0062] In one embodiment, the view display device may first determine that the absolute offset distance of the list view meets a preset condition, and then determine the absolute offset distance of the scroll view, that is, first determine that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen, and then determine the absolute offset distance of the scroll view. Wherein, determining that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen is to ensure that the target list view unit can be displayed in the list view control, because when the target list view unit is not displayed in the list view control, the relevant operations of the scroll view are unnecessary and therefore may not be performed, so in this case, computing resources can be saved. In this case, the value range of the absolute offset distance of the list view can be given by the following formula (2):
[0063] beginOffset-h≤tableView.contentOffset.y≤beginOffset+h1 (2)
[0064] Among them, beginOffset is the initial offset distance of the target list view unit, tableView.contentOffset.y is the absolute offset distance of the list view, h is the height of the target list view unit, and h1 is the height of the displayable area in the display screen. Since it is the same as the height of the third area, it can be represented by the height of the third area.
[0065] When the list view cells in a list view have the same size, the above formula (2) can be simplified to the following formula (3):
[0066] beginOffset-h≤tableView.contentOffset.y≤index×h (3)
[0067] Among them, index is the arrangement order of the target list view unit in the list view, that is, the target list view unit is the nth list view unit in the list view, and h is the height of the target list view unit.
[0068] In one embodiment, if the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and is less than or equal to the initial offset distance of the target list view, the absolute offset distance of the scroll view is determined to be zero; if the absolute offset distance of the list view is greater than the initial offset distance of the target list view unit, and is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen, the distance difference is mapped based on a proportional relationship to obtain the absolute offset distance of the scroll view.
[0069] Furthermore, since the view display device can embed a scroll view control in a list view cell control and display the scroll view slidingly based on the scroll view control; and since the interface property offsetY is provided in the list view cell control, the view display device can first assign the obtained absolute offset distance of the scroll view to the interface property offsetY, and then assign the interface property offsetY to the parameter in the scroll view control for controlling the absolute offset of the scroll view, which parameter for controlling the absolute offset of the scroll view can be scrollView.contentOffset, and then determine the target area of the scroll view based on the obtained absolute offset distance of the scroll view.
[0070] In one embodiment, a view display device determines a target area of a scrolling view based on an absolute offset distance of the scrolling view and a size of a target list view unit in the second area, which may include: determining a position indicated by the absolute offset distance of the scrolling view in the scrolling view as a first boundary of the target area of the scrolling view; determining a position obtained by moving the position indicated by the absolute offset distance of the scrolling view in the scrolling view down by a target height as a second boundary of the target area of the scrolling view, wherein the target height is a height of the target list view unit in the second area; and determining an area between the second boundary and the first boundary as the target area of the scrolling view.
[0071] For example, if Figure 8 As shown, it is a schematic diagram of determining the target area of a scrolling view provided by an embodiment of the present application, assuming that the size of the scrolling view is the same as the size of the displayable area, assuming that the height of the target view unit is h, assuming that the height of the scrolling view is 4h, and the scrolling view is fully displayed as shown by mark 801; if the absolute offset distance of the scrolling view is zero, and the height of the target list view unit in the second area is 0.5h, which is half of the height of the target view unit, then the target area of the scrolling view is as shown by mark 802; if the absolute offset distance of the scrolling view is 2*h, and the height of the target list view unit in the second area is h, which is the height of the target list view unit, then the target area of the scrolling view is as shown by mark 803; if the absolute offset distance of the scrolling view is 3.5*h, and the height of the target list view unit in the second area is 0.5h, which is half of the height of the target view unit, then the target area of the scrolling view is as shown by mark 804.
[0072] S304: Display a second list view unit located in a second area of the list view on the display screen.
[0073] The second list view unit is a list view unit located in the second area of the list view, and the second list view unit includes the adjusted target list view unit.
[0074] For example, assuming that the list view includes list view unit 1, list view unit 2, list view unit 3, list view unit 4, list view unit 5, list view unit 6, list view unit 7 and list view unit 8, where the target list view unit is list view unit 7, the height of the target list view unit is h, assuming that the size of each list view unit is the same, the display area can display 4 complete list view units, and the first list view unit displayed by the list view in the display area is the default list view unit. At this time, the preset condition for the absolute offset distance of the list view is that the absolute offset distance of the list view is greater than 2h and less than or equal to 7h. Assume that the ratio between the size of the scroll view and the target size is 1:1. If the user performs the first sliding operation on the list view, and the upward sliding distance is h, the absolute offset distance of the list view is h at this time. If the preset condition is not met, the target list view unit will not be displayed. Figure 9a As shown, it is a schematic diagram of performing a first sliding operation on a list view provided by an embodiment of the present application. The list view displayed before the first sliding operation can be as shown by 901, and the list view displayed after the first sliding is as shown by 902; if the user performs a second sliding operation on the list view after the first sliding operation, the sliding distance of the upward sliding is 1.5*h, and the absolute offset distance of the list view is 2.5h at this time. The height of the target list view unit in the second area is 0.5*h, and the list view displayed after the second sliding is as shown by 903, and the absolute offset distance of the scroll view is 0 at this time. The target area of the scroll view can be specifically shown as 913; if the user performs a third sliding operation on the list view after the second sliding operation, the upward sliding distance is 1.5*h, and the absolute offset distance of the scroll view is 2.5h. The height of the target list view unit in the second area is 0.5*h, and the list view displayed after the second sliding is as shown by 903, and the absolute offset distance of the scroll view is 0, and the target area of the scroll view can be specifically as shown by 913. The sliding distance of the upward slide is 2.5*h, and the absolute offset distance of the list view is 5h. The height of the target list view unit in the second area is h. The list view displayed after the third slide is as shown in 904. The absolute offset distance of the scroll view is 2h. The target area of the scroll view can be specifically shown as 914; if the user performs a fourth slide operation on the list view after the third slide operation, the sliding distance of the upward slide is 1.5*h. The absolute offset distance of the list view is 6.5h. The height of the target list view unit in the second area is 0.5h. The list view displayed after the third slide is as shown in 905. The absolute offset distance of the scroll view is 3.5h. The target area of the scroll view can be specifically shown as 915.
[0075] In an embodiment of the present application, a view display device displays a first list view unit located in a first area of a list view in its display screen, wherein the list view includes at least one list view unit, and there is a target list view unit including a scrolling view in at least one list view unit, the size of the scrolling view is larger than the size of the target list view unit, and the first area matches the target size of the displayable area in the display screen; if there is a sliding event for the list view, the second area of the list view is determined according to the sliding distance and the target size corresponding to the sliding event; the target area of the scrolling view is determined according to the sliding distance and the size of the target list view unit in the second area, and the target list view unit is adjusted to obtain an adjusted target list view unit, and the adjusted target list view unit includes the content located in the target area of the scrolling view; the second list view unit located in the second area of the list view is displayed on the display screen, and the second list view unit includes the adjusted target list view unit. When there is a sliding event for the list view, the view display device can not only determine the second area of the list view according to the sliding distance and the target size corresponding to the sliding event, and display the second list view unit located in the second area of the list view to realize the sliding display of the list view; but also can determine the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and display the content located in the target area of the scroll view to realize the sliding display of the scroll view, that is, the sliding display of the scroll view can be realized according to the sliding event for the list view; and because the size of the scroll view is larger than the size of the target list view unit, it represents that when the scroll view is a long image and text, the sliding display of the long image and text can be realized according to the sliding event for the list view, thereby enriching the display method of the long image and text.
[0076] Based on the above view display system embodiment and view display method embodiment, the present application embodiment provides another view display method. Fig.10 , which is a flow chart of another view display method provided in an embodiment of the present application. Fig.10 The view display method shown can be executed by a view display device. Fig.10 The view display method shown may include the following steps:
[0077] S1001: Display a first list view unit in a first area of a list view on a display screen.
[0078] The list view includes at least one list view unit, and there is a target list view unit including a scroll view in at least one list view unit, and the size of the scroll view is larger than the size of the target list view unit, that is, the size of the scroll view is larger than the size of the target list view unit control. Optionally, the scroll view can be a picture, text, or graphic, etc.
[0079] S1002: If there is a sliding event for the list view, determine the absolute offset distance of the list view according to the sliding distance corresponding to the sliding event.
[0080] S1003: Determine a second area of the list view according to the absolute offset distance and the target size of the list view.
[0081] The relevant processes involved in step S1001 to step S1003 have been introduced in step S301 to step S302 and will not be repeated here.
[0082] S1004: If the absolute offset distance of the list view does not satisfy a preset condition, display a second list view unit located in a second area of the list view on the display screen.
[0083] Among them, the preset condition is that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen.
[0084] The second list view unit is a list view unit located in the second area of the list view, and the second list view unit does not include the target list view unit.
[0085] S1005: If the absolute offset distance of the list view meets a preset condition, determine the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and adjust the target list view unit to obtain an adjusted target list view unit.
[0086] The adjusted target list view unit includes the content located in the target area of the scroll view.
[0087] In one embodiment, the view display device determines the target area of the scrolling view based on the sliding distance and the size of the target list view unit in the second area, which may include: determining the absolute offset distance of the scrolling view based on the sliding distance, the absolute offset distance of the scrolling view is positively correlated with the sliding distance; determining the target area of the scrolling view based on the absolute offset distance of the scrolling view and the size of the target list view unit in the second area.
[0088] In one embodiment, the view display device determines the absolute offset distance of the scrolling view based on the sliding distance, which may include: determining the absolute offset distance of the list view based on the sliding distance, and determining the absolute offset distance of the scrolling view based on the absolute offset distance of the list view and the initial offset distance of the target list view unit.
[0089] In one embodiment, the view display device determines the absolute offset distance of the scroll view according to the sliding distance, and may also include: determining the relative offset distance of the list view according to the sliding distance, the relative offset distance of the list view is positively correlated with the sliding distance; determining the relative offset distance of the scroll view according to the relative offset distance of the list view, the relative offset distance of the scroll view is positively correlated with the relative offset distance of the list view; determining the absolute offset distance of the scroll view according to the relative offset distance of the scroll view and the current offset distance of the scroll view. Wherein, the current offset distance of the scroll view indicates the absolute offset distance of the scroll view when the first list view unit located in the first area of the list view is displayed on the display screen, and the relative offset distance of the list view indicates the offset between the second area of the list view and the first area of the list view, and the relative offset distance of the list view can be characterized by the difference between the distance between the top of the second area and the top of the first area.
[0090] In a specific implementation, the view display device can monitor the sliding events of the list view through the processing center based on the key-value pair observation of the object in the observer mode. Specifically, it can obtain the relative offset distance of the list view by monitoring the sliding distance corresponding to the sliding event.
[0091] Further, if the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and is less than or equal to the initial offset distance of the target list view, the absolute offset distance of the scroll view is determined to be zero; if the absolute offset distance of the list view is greater than the initial offset distance of the target list view unit, and is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen, the relative offset distance of the scroll view is determined according to the relative offset distance of the list view, and then the absolute offset distance of the scroll view is determined according to the relative offset distance of the scroll view and the current offset distance of the scroll view, wherein the absolute offset distance of the scroll view is the sum of the relative offset distance of the scroll view and the current offset distance of the scroll view.
[0092] In a specific implementation, the view display device determines the relative offset distance of the scroll view according to the relative offset distance of the list view, which may include: mapping the relative offset distance of the list view based on a proportional relationship to obtain the relative offset distance of the scroll view, wherein the proportional relationship is the proportional relationship between the size of the scroll view and the target size, and may specifically be: the proportional relationship between the height of the scroll view and the height in the target size of the displayable area. For example, if the proportional relationship between the size of the scroll view and the target size is 1:1, the relative offset distance of the scroll view and the relative offset distance of the list view are mapped at 1:1, that is, the relative offset distance of the scroll view is the same as the relative offset distance of the list view; if the proportional relationship between the size of the scroll view and the target size is N:1, N is any real number greater than 1, then the relative offset distance of the scroll view and the relative offset distance of the list view are mapped at N:1, that is, if the relative offset distance of the list view is 1, then the relative offset distance of the scroll view obtained is N. Among them, mapping the relative offset distance of the list view based on the proportional relationship between the size of the scroll view and the target size can well perform proportional sliding display on a scroll view whose size is larger than the target size of the displayable area.
[0093] S1006: Display a second list view unit located in a second area of the list view on the display screen.
[0094] The second list view unit is a list view unit located in the second area of the list view, and the second list view unit includes the adjusted target list view unit.
[0095] In an embodiment of the present application, a view display device displays a first list view unit located in a first area of a list view in its display screen, wherein the list view includes at least one list view unit, and there is a target list view unit including a scrolling view in at least one list view unit, the size of the scrolling view is larger than the size of the target list view unit, and the first area matches the target size of the displayable area in the display screen; if there is a sliding event for the list view, the second area of the list view is determined according to the sliding distance and the target size corresponding to the sliding event; the target area of the scrolling view is determined according to the sliding distance and the size of the target list view unit in the second area, and the target list view unit is adjusted to obtain an adjusted target list view unit, and the adjusted target list view unit includes the content located in the target area of the scrolling view; the second list view unit located in the second area of the list view is displayed on the display screen, and the second list view unit includes the adjusted target list view unit. When there is a sliding event for the list view, the view display device can not only determine the second area of the list view according to the sliding distance and the target size corresponding to the sliding event, and display the second list view unit located in the second area of the list view to realize the sliding display of the list view; but also can determine the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and display the content located in the target area of the scroll view to realize the sliding display of the scroll view, that is, the sliding display of the scroll view can be realized according to the sliding event for the list view; and because the size of the scroll view is larger than the size of the target list view unit, it represents that when the scroll view is a long image and text, the sliding display of the long image and text can be realized according to the sliding event for the list view, thereby enriching the display method of the long image and text.
[0096] In one embodiment, Fig.11As shown, a flow chart of an execution view display method provided by an embodiment of the present application. First, the view display device can first create a processing center (UImsgCenter). The view display device can implement functions such as event processing, distribution and callback through the processing center. For example, through the processing center, the sliding event for the list view can be monitored based on the key-value pair observation of the object in the observer mode, and the parameter value obtained by the monitoring can be called back, for example, the absolute offset distance of the scroll view obtained by the monitoring and the relative offset distance of the scroll view can be called back; then the parameter value obtained by the callback can be distributed, for example, the absolute offset distance of the scroll view obtained by the callback can be distributed to the interface attribute offsetY in the list view unit control, thereby realizing the parameter assignment for controlling the absolute offset of the scroll view in the scroll view control, and then realizing the sliding display of the scroll view. Specifically, it is necessary to set the agent corresponding to the control to the processing center so that the processing center can distribute the parameters obtained by the callback to the control, and then control the content in the control based on the obtained parameters, for example, the scroll view can be controlled based on the absolute offset distance of the scroll view distributed by the processing center, that is, the scrolling display of the scroll view is realized.
[0097] After detecting a display trigger event for a list view, the view display device sends a content data request to the server and initializes the page elements of the page to which the list view belongs; then the view display device determines the size of the list view control and the displayable area of the list view in the list view control according to the size of the display screen and the size of the top navigation bar and the bottom navigation bar of the page to which the list view belongs; then the view display device parses and assembles at least one content data obtained, and assembles the elements used for the synthetic page in the order of arrangement, so that one content data can be carried based on a list view unit control to obtain a list view, and sets the list view unit control and the agent corresponding to the list view control as the processing center. The agent corresponding to the list view unit control is set as the agent center because the list view control itself does not have the ability to interact, so the processing center with interactive capabilities is set as its agent to enable it to have interactive capabilities, for example, it can enable it to slide and display the scroll view carried in the list view unit control according to the sliding event for the list view.
[0098] Among them, if there is a scroll view in at least one content data, the scroll view control needs to be configured so that the scroll view can be displayed in the list view unit control based on the scroll view control, wherein the setting of the scroll view control mainly includes setting the size of the scroll view control and setting the size of the capacity of the scroll view control, and setting the size of the capacity of the scroll view control to the size of the scroll view, so that the scroll view can be displayed by sliding through the scroll view control.
[0099] The view display device displays the list view based on the list view control, and displays the first list view unit located in the first area of the list view. At this time, the first list view unit is the default list view unit; if the view display device detects a sliding event for the list view, the second area of the list view is determined according to the sliding distance and the target size corresponding to the sliding event, and the absolute offset distance of the list view is determined according to the sliding distance corresponding to the sliding event. If the absolute offset distance of the list view meets a preset condition, the absolute offset distance of the scroll view is determined based on the absolute offset distance of the list view; and the determined absolute offset distance of the scroll view is assigned to the interface property offsetY provided in the list view unit control that carries the scroll view, and the parameter for controlling the absolute offset of the scroll view is changed based on the absolute offset distance of the scroll view, so that the target area of the scroll view can be determined according to the determined absolute offset distance of the scroll view; finally, the second list view unit located in the second area of the list view is displayed, and the content of the target area of the scroll view is displayed.
[0100] Based on the above system and method embodiments, the present application embodiment provides a view display device. Fig.12 , is a structural schematic diagram of a view display device provided in an embodiment of the present application, and the view display device may include a display unit 1201 and a processing unit 1202. Fig.12 The view display device shown can run the following units:
[0101] A display unit 1201 is configured to display a first list view unit located in a first area of a list view on a display screen, wherein the list view includes at least one list view unit, a target list view unit including a scroll view exists in the at least one list view unit, a size of the scroll view is larger than a size of the target list view unit, and the first area matches a target size of a displayable area on the display screen;
[0102] The processing unit 1202 is configured to determine, if there is a sliding event for the list view, a second area of the list view according to a sliding distance corresponding to the sliding event and the target size;
[0103] The processing unit 1202 is further configured to determine a target area of the scroll view according to the sliding distance and a size of the target list view unit in the second area, and adjust the target list view unit to obtain an adjusted target list view unit, wherein the adjusted target list view unit includes content located in the target area of the scroll view;
[0104] The display unit 1201 is further configured to display, on the display screen, a second list view unit located in a second area of the list view, wherein the second list view unit includes the adjusted target list view unit.
[0105] In one embodiment, when the processing unit 1202 determines the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, the processing unit 1202 specifically performs the following operations:
[0106] Determining an absolute offset distance of the scroll view according to the sliding distance, wherein the absolute offset distance of the scroll view is positively correlated with the sliding distance;
[0107] A target area of the scroll view is determined according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area.
[0108] In one embodiment, when the processing unit 1202 determines the absolute offset distance of the scroll view according to the sliding distance, the processing unit 1202 specifically performs the following operations:
[0109] determining an absolute offset distance of the list view according to the sliding distance, wherein the absolute offset distance of the list view is positively correlated with the sliding distance;
[0110] The absolute offset distance of the scroll view is determined based on the absolute offset distance of the list view and the initial offset distance of the target list view unit, wherein the initial offset distance of the target list view unit indicates the offset of the position of the target list view unit in the list view relative to any position in the third area of the list view, wherein the first list view unit located in the third area is the first list view unit in the list view, and the absolute offset distance of the list view is zero when the list view unit located in the third area is displayed on the display screen.
[0111] In one embodiment, when the processing unit 1202 determines the absolute offset distance of the scroll view according to the absolute offset distance of the list view and the initial offset distance of the target list view unit, the processing unit 1202 specifically performs the following operations:
[0112] Determining a distance difference between the absolute offset distance of the list view unit and an initial offset distance of the target list view unit;
[0113] The absolute offset distance of the scroll view is determined according to the distance difference, and the absolute offset distance of the scroll view is positively correlated with the distance difference.
[0114] In one embodiment, before determining the absolute offset distance of the scroll view according to the distance difference, the processing unit 1202 is further configured to:
[0115] Determine a proportional relationship between the size of the scroll view and the target size;
[0116] When the processing unit 1202 determines the absolute offset distance of the scroll view according to the distance difference, the processing unit 1202 specifically performs the following operations:
[0117] The distance difference is mapped based on the proportional relationship to obtain an absolute offset distance of the scroll view.
[0118] In one embodiment, before determining the distance difference between the absolute offset distance of the list view unit and the initial offset distance of the target list view unit, the processing unit 1202 is further configured to:
[0119] Determine that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen.
[0120] In one embodiment, when the processing unit 1202 determines the absolute offset distance of the scroll view according to the sliding distance, the processing unit 1202 specifically performs the following operations:
[0121] Determining a relative offset distance of the list view according to the sliding distance, wherein the relative offset distance of the list view is positively correlated with the sliding distance;
[0122] Determining the relative offset distance of the scroll view according to the relative offset distance of the list view, wherein the relative offset distance of the scroll view is positively correlated with the relative offset distance of the list view;
[0123] An absolute offset distance of the scrolling view is determined based on the relative offset distance of the scrolling view and the current offset distance of the scrolling view, wherein the current offset distance of the scrolling view indicates the absolute offset distance of the scrolling view when a first list view unit located in a first area of the list view is displayed in the display screen.
[0124] In one embodiment, when the processing unit 1202 determines the target area of the scroll view according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area, the processing unit 1202 specifically performs the following operations:
[0125] determining a position indicated by the absolute offset distance of the scroll view in the scroll view as a first boundary of a target area of the scroll view;
[0126] Determine a position obtained by moving the position indicated by the absolute offset distance of the scroll view in the scroll view downward by a target height as a second boundary of the target area of the scroll view, where the target height is the height of the target list view unit in the second area;
[0127] An area between the second boundary and the first boundary is determined as a target area of the scroll view.
[0128] According to one embodiment of the present application, Figure 3 as well as Fig.10 The various steps involved in the view display method shown can be performed by Fig.12 The diagram shown is performed by each unit in the display device. For example, Figure 3 Step S301 and step S304 shown in FIG. Fig.12 The display unit 1201 in the view display device shown is executed, Figure 3 Step S302 and step S303 shown in FIG. Fig.12 The processing unit 1202 in the view display device shown in the figure is executed. Fig.10 Step S1001, step S1004 and step S1006 shown in FIG. Fig.12 The display unit 1201 in the view display device shown is executed, Fig.10 Step S1002, step S1003 and step S1005 shown in FIG. Fig.12 The view shown is executed by the processing unit 1202 in the display device.
[0129] According to another embodiment of the present application, Fig.12 The various units in the view display device shown can be individually or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the view display device based on logical function division can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0130] According to another embodiment of the present application, the program can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 3 as well as Fig.10 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Fig.12 The view display device shown in and the view display method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer-readable storage medium, and loaded into the above-mentioned computing device through the computer-readable storage medium and run therein.
[0131] In an embodiment of the present application, a first list view unit located in a first area of a list view is displayed on a display screen based on display unit 1201, wherein the list view includes at least one list view unit, and a target list view unit including a scroll view exists in at least one list view unit, the size of the scroll view is larger than the size of the target list view unit, and the first area matches a target size of a displayable area on the display screen; if there is a sliding event for the list view, the processing unit 1202 determines a second area of the list view according to a sliding distance and a target size corresponding to the sliding event; determines a target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, and adjusts the target list view unit to obtain an adjusted target list view unit, wherein the adjusted target list view unit includes content located in the target area of the scroll view; then a second list view unit located in the second area of the list view is displayed on the display screen based on display unit 1201, and the second list view unit includes the adjusted target list view unit. When there is a sliding event for the list view, not only can the second area of the list view be determined according to the sliding distance and the target size corresponding to the sliding event, and the second list view unit located in the second area of the list view be displayed to realize the sliding display of the list view; but also the target area of the scroll view can be determined according to the sliding distance and the size of the target list view unit in the second area, and the content located in the target area of the scroll view can be displayed to realize the sliding display of the scroll view, that is, the sliding display of the scroll view can be realized according to the sliding event for the list view; and because the size of the scroll view is larger than the size of the target list view unit, it represents that when the scroll view is a long image and text, the sliding display of the long image and text can be realized according to the sliding event for the list view, thereby enriching the display method of the long image and text.
[0132] Based on the above method embodiment and apparatus embodiment, the present application also provides a view display device. Fig.13, which is a structural diagram of a view display device provided in an embodiment of the present application. Fig.13 The view display device shown may include at least a processor 1301, an input interface 1302, an output interface 1303, and a computer storage medium 1304. The processor 1301, the input interface 1302, the output interface 1303, and the computer storage medium 1304 may be connected via a bus or other means.
[0133] The computer storage medium 1304 may be stored in the memory of the view display device. The computer storage medium 1304 is used to store a computer program. The computer program includes program instructions. The processor 1301 is used to execute the program instructions stored in the computer storage medium 1304. The processor 1301 (or CPU (Central Processing Unit)) is the computing core and control core of the view display device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the above-mentioned view display method process or corresponding functions.
[0134] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in a view display device for storing programs and data. It is understandable that the computer storage medium here can include both the built-in storage medium in the terminal and the extended storage medium supported by the terminal. The computer storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor 1301 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.
[0135] In one embodiment, the processor 1301 and the output interface 1303 may load and execute one or more instructions stored in the computer storage medium to implement the above-mentioned Figure 3 as well as Fig.10 In the corresponding steps of the method in the view display method embodiment, in a specific implementation, one or more instructions in the computer storage medium are loaded by the processor 1301 and the output interface 1303 and execute the following steps:
[0136] an output interface 1303, configured to display, on a display screen, a first list view unit located in a first area of a list view, wherein the list view includes at least one list view unit, wherein the at least one list view unit includes a target list view unit including a scroll view, wherein a size of the scroll view is larger than a size of the target list view unit, and the first area matches a target size of a displayable area on the display screen;
[0137] Processor 1301 is configured to determine, if there is a sliding event for the list view, a second area of the list view according to a sliding distance corresponding to the sliding event and the target size;
[0138] The processor 1301 is further configured to determine a target area of the scroll view according to the sliding distance and a size of the target list view unit in the second area, and adjust the target list view unit to obtain an adjusted target list view unit, wherein the adjusted target list view unit includes content located in the target area of the scroll view;
[0139] The output interface 1303 is further configured to display, on the display screen, a second list view unit located in a second area of the list view, wherein the second list view unit includes the adjusted target list view unit.
[0140] In one embodiment, when the processor 1301 determines the target area of the scroll view according to the sliding distance and the size of the target list view unit in the second area, the processor 1301 specifically performs the following operations:
[0141] Determining an absolute offset distance of the scroll view according to the sliding distance, wherein the absolute offset distance of the scroll view is positively correlated with the sliding distance;
[0142] A target area of the scroll view is determined according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area.
[0143] In one embodiment, when the processor 1301 determines the absolute offset distance of the scroll view according to the sliding distance, the processor 1301 specifically performs the following operations:
[0144] determining an absolute offset distance of the list view according to the sliding distance, wherein the absolute offset distance of the list view is positively correlated with the sliding distance;
[0145] The absolute offset distance of the scroll view is determined based on the absolute offset distance of the list view and the initial offset distance of the target list view unit, wherein the initial offset distance of the target list view unit indicates the offset of the position of the target list view unit in the list view relative to any position in the third area of the list view, wherein the first list view unit located in the third area is the first list view unit in the list view, and the absolute offset distance of the list view is zero when the list view unit located in the third area is displayed on the display screen.
[0146] In one embodiment, when the processor 1301 determines the absolute offset distance of the scroll view according to the absolute offset distance of the list view and the initial offset distance of the target list view unit, the processor 1301 specifically performs the following operations:
[0147] Determining a distance difference between the absolute offset distance of the list view unit and an initial offset distance of the target list view unit;
[0148] The absolute offset distance of the scroll view is determined according to the distance difference, and the absolute offset distance of the scroll view is positively correlated with the distance difference.
[0149] In one embodiment, before determining the absolute offset distance of the scroll view according to the distance difference, the processor 1301 is further configured to:
[0150] Determine a proportional relationship between the size of the scroll view and the target size;
[0151] When the processor 1301 determines the absolute offset distance of the scroll view according to the distance difference, the processor 1301 specifically performs the following operations:
[0152] The distance difference is mapped based on the proportional relationship to obtain an absolute offset distance of the scroll view.
[0153] In one embodiment, before determining the distance difference between the absolute offset distance of the list view unit and the initial offset distance of the target list view unit, the processor 1301 is further configured to:
[0154] Determine that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen.
[0155] In one embodiment, when the processor 1301 determines the absolute offset distance of the scroll view according to the sliding distance, the processor 1301 specifically performs the following operations:
[0156] Determining a relative offset distance of the list view according to the sliding distance, wherein the relative offset distance of the list view is positively correlated with the sliding distance;
[0157] Determining the relative offset distance of the scroll view according to the relative offset distance of the list view, wherein the relative offset distance of the scroll view is positively correlated with the relative offset distance of the list view;
[0158] An absolute offset distance of the scrolling view is determined based on the relative offset distance of the scrolling view and the current offset distance of the scrolling view, wherein the current offset distance of the scrolling view indicates the absolute offset distance of the scrolling view when a first list view unit located in a first area of the list view is displayed in the display screen.
[0159] In one embodiment, when the processor 1301 determines the target area of the scroll view according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area, the processor 1301 specifically performs the following operations:
[0160] determining a position indicated by the absolute offset distance of the scroll view in the scroll view as a first boundary of a target area of the scroll view;
[0161] Determine a position obtained by moving the position indicated by the absolute offset distance of the scroll view in the scroll view downward by a target height as a second boundary of the target area of the scroll view, where the target height is the height of the target list view unit in the second area;
[0162] An area between the second boundary and the first boundary is determined as a target area of the scroll view.
[0163] The embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the view display device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the view display device performs the above-mentioned Figure 3 or Fig.10 The method embodiment shown in the figure. The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0164] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A view display method, characterized in that: include: Displaying a first list view unit located in a first area of a list view on a display screen, wherein the list view includes at least one list view unit, a target list view unit including a scroll view exists in the at least one list view unit, a size of the scroll view is larger than a size of the target list view unit, and the first area matches a target size of a displayable area on the display screen; If there is a sliding event for the list view, the absolute offset distance of the list view is determined according to the sliding distance corresponding to the sliding event, and the second area of the list view is determined according to the absolute offset distance of the list view and the target size; the second area of the list view is an area for sliding display of the list view determined according to the sliding event for the list view; the absolute offset distance of the list view is positively correlated with the sliding distance, and the absolute offset distance of the list view is used to indicate the offset between the second area of the list view and the third area of the list view, and the third area of the list view is an area including a default list view unit; when the list view unit located in the third area is displayed on the display screen, the absolute offset distance of the list view is zero; If the absolute offset distance of the list view does not meet a preset condition, a second list view unit located in the second area of the list view is displayed in the display screen; the preset condition is that the absolute offset distance of the list view is greater than the difference between the initial offset distance of the target list view unit and the height of the target list view unit, and the absolute offset distance of the list view is less than or equal to the sum of the initial offset distance of the target list view unit and the height of the displayable area in the display screen; the second list view unit is a list view unit located in the second area of the list view, and the target list view unit is not included in the second list view unit; the initial offset distance of the target list view unit indicates the offset of the position of the target list view unit in the list view relative to any position in the third area of the list view; If the absolute offset distance of the list view meets the preset condition, the absolute offset distance of the scroll view is determined according to the sliding distance, the absolute offset distance of the scroll view is positively correlated with the sliding distance, and the absolute offset distance of the scroll view is used to indicate the distance between the top of the content portion displayed by the scroll view and the top of the scroll view when the scroll view is displayed in the target list view unit control; according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area, the target area of the scroll view is determined, and the target list view unit is adjusted to obtain an adjusted target list view unit, and the adjusted target list view unit includes the content located in the target area of the scroll view; A second list view unit located in a second area of the list view is displayed in the display screen, the second list view unit including the adjusted target list view unit.
2. The method according to claim 1, characterized in that The determining the absolute offset distance of the scroll view according to the sliding distance includes: determining an absolute offset distance of the list view according to the sliding distance, wherein the absolute offset distance of the list view is positively correlated with the sliding distance; The absolute offset distance of the scroll view is determined according to the absolute offset distance of the list view and the initial offset distance of the target list view unit, wherein the first list view unit located in the third area is the first list view unit in the list view.
3. The method according to claim 2, characterized in that The determining the absolute offset distance of the scroll view according to the absolute offset distance of the list view and the initial offset distance of the target list view unit includes: Determining a distance difference between the absolute offset distance of the list view unit and an initial offset distance of the target list view unit; The absolute offset distance of the scroll view is determined according to the distance difference, and the absolute offset distance of the scroll view is positively correlated with the distance difference.
4. The method according to claim 3, characterized in that Before determining the absolute offset distance of the scroll view according to the distance difference, the method further includes: Determine a proportional relationship between the size of the scroll view and the target size; The determining the absolute offset distance of the scroll view according to the distance difference includes: The distance difference is mapped based on the proportional relationship to obtain an absolute offset distance of the scroll view.
5. The method according to claim 1, characterized in that The determining the absolute offset distance of the scroll view according to the sliding distance includes: determining a relative offset distance of the list view according to the sliding distance, wherein the relative offset distance of the list view is positively correlated with the sliding distance, and the relative offset distance of the list view is used to indicate an offset between a second area of the list view and a first area of the list view; Determining the relative offset distance of the scroll view according to the relative offset distance of the list view, wherein the relative offset distance of the scroll view is positively correlated with the relative offset distance of the list view; The absolute offset distance of the scrolling view is determined based on the relative offset distance of the scrolling view and the current offset distance of the scrolling view, wherein the current offset distance of the scrolling view indicates the absolute offset distance of the scrolling view when the first list view unit located in the first area of the list view is displayed in the display screen, and the absolute offset distance of the scrolling view is the sum of the relative offset distance of the scrolling view and the current offset distance of the scrolling view.
6. The method according to claim 1, characterized in that The determining the target area of the scroll view according to the absolute offset distance of the scroll view and the size of the target list view unit in the second area includes: determining a position indicated by the absolute offset distance of the scroll view in the scroll view as a first boundary of a target area of the scroll view; Determine a position obtained by moving the position indicated by the absolute offset distance of the scroll view in the scroll view downward by a target height as a second boundary of the target area of the scroll view, where the target height is the height of the target list view unit in the second area; An area between the second boundary and the first boundary is determined as a target area of the scroll view.
7. A view display device, characterized in that: The view display device comprises a display unit and a processing unit, and the display unit and the processing unit are used to execute the view display method according to any one of claims 1 to 6.
8. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, they are used to execute the view display method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Page displaying method and client side
CN107807764A
Long picture and text information display method, computer device, and computer-readable storage medium
CN109062653A
Picture display method and device
CN110399069A
Sliding view display method and device and mobile terminal
CN110568974A
User interface display method and device, electronic device and computer readable storage medium
CN110716684A
