Processing Method, Device, Equipment and Storage Medium of Scroll View

By generating blank views in the scroll view and dynamically adjusting the position of the content view, the problems of poor user experience and high memory footprint in the prior art are solved, and the fluency of scrolling and effective memory reuse are achieved.

CN112148286BActive Publication Date: 2025-06-17BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910580299.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-28
Publication Date
2025-06-17
Estimated Expiration
2039-06-28

AI Technical Summary

Technical Problem

When embedding web pages or lists in scroll view, the prior art can easily lead to poor user experience, high memory usage, excessive content, and memory overflow and application crashes.

Method used

By obtaining the total height required for the content to be displayed, generating a blank view and putting it into the scroll view, obtaining the offset of the scroll view according to the user's operations, dynamically adjusting the position of the content view, realizing the linkage between the scroll view and the content view, and maintaining the memory reuse of the content view.

Benefits of technology

Improves user experience, reduces memory footprint, avoids memory overflow and application crashes, and achieves scrolling fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112148286B_ABST
    Figure CN112148286B_ABST
Patent Text Reader

Abstract

The present invention provides a method, apparatus, device, and storage medium for processing a scroll view. The method includes: obtaining the total height required for the content to be displayed that needs to be displayed through the scroll view, generating a blank view according to the total height, and placing the blank view into the scroll view; obtaining the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen; obtaining the coordinates of the content view after scrolling according to the blank view and the offset; obtaining the display page corresponding to the coordinates of the content view for display. The content to be displayed includes the content on the display page. Through the intermediate effect of the intermediate blank view, by dynamically adjusting the position of the content view, while using the linkage of the scroll view and the content view, and maintaining the memory reuse effect of the content view itself, the smooth scrolling of the mobile application is maintained and the memory occupancy is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of page development, and in particular, to a method, device, equipment and storage medium for processing a scroll view. Background Art

[0002] With the rise of graphical user interfaces, the proportion of user interfaces in software systems has become increasingly large, and the use of smart terminals such as mobile phones and tablet computers for web pages and application programs has become increasingly popular. During the actual development of application programs on terminals, it is often necessary to embed a web page or a list into an existing scroll view, and the web page (WebView) or the list (TableView) needs to be scrolled to display all content. Since many current smart terminals are touchscreens, only one scroll event can be responded to, and multiple scroll views will cause gesture conflicts, affecting the user experience.

[0003] However, there are currently two ways to implement this requirement in the industry: First, when scrolling to the position of the web page (WebView) or the list (TableView), the scrolling of the scroll view (ScrollView) is forcibly stopped, and a gesture switch is performed. After the switch, the web page or the list can be scrolled. Second, the entire web page (WebView) or the entire list (TableView) is spread out and stretched to the height at which all content is displayed, and then placed in the scroll view (ScrollView).

[0004] However, the solutions of the prior art are likely to cause a sense of lag to users, occupy more memory, and serious cases of excessive content will lead to memory overflow and application crashes. Summary of the Invention

[0005] Embodiments of the present invention provide a method, device, equipment and storage medium for processing a scroll view to solve the problems in the prior art that are likely to cause a sense of lag to users, occupy more memory, and serious cases of excessive content will lead to memory overflow and application crashes.

[0006] In a first aspect, an embodiment of the present invention provides a method for processing a scroll view, which is applied to an electronic device, and the method includes:

[0007] Obtain the total height required for the content to be displayed that needs to be displayed through the scroll view;

[0008] Generate a blank view according to the total height and place the blank view in the scroll view;

[0009] Obtain the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen;

[0010] Obtain the coordinates of the content view after scrolling according to the blank view and the offset;

[0011] Obtain the display page corresponding to the coordinates of the content view for display, where the content to be displayed includes the content on the display page.

[0012] In a possible design, the display page includes:

[0013] A page at the position corresponding to the coordinates of the content view;

[0014] Or,

[0015] A page at the position corresponding to the coordinates of the content view and all previous pages

[0016] In a possible design, obtaining the display page corresponding to the coordinates of the content view includes:

[0017] If the sum of the offset and the screen height of the electronic device is greater than or equal to the coordinates of the content view, obtain the corresponding content view position according to the coordinates of the content view;

[0018] Obtain the display page from the content to be displayed according to the content view position.

[0019] In a possible design, the content view position includes the content view coordinates and / or the content view offset.

[0020] In a possible design, obtaining the corresponding content view position according to the coordinates of the content view includes:

[0021] Obtain the content view offset according to the offset and the coordinates of the floor of the blank view after scrolling;

[0022] And / or,

[0023] Obtain the content view coordinates according to the offset and the coordinates of the middle view of the blank view after scrolling.

[0024] In a second aspect, an embodiment of the present invention provides a processing device for a scroll view, including:

[0025] An obtaining module, configured to obtain the total height required for the content to be displayed that needs to be displayed through the scroll view;

[0026] A processing module, configured to generate a blank view according to the total height and place the blank view in the scroll view;

[0027] The processing module is further configured to obtain the offset of the scroll view from the start of scrolling to the end of scrolling according to the operation of the user on the touch screen;

[0028] The processing module is further configured to obtain the coordinates of the content view after scrolling according to the blank view and the offset.

[0029] A display module, configured to obtain a display page corresponding to the coordinates of the content view for display, where the content to be displayed includes the content on the display page.

[0030] In a possible design, the display page includes:

[0031] A page at a position corresponding to the coordinates of the content view;

[0032] Or,

[0033] A page at a position corresponding to the coordinates of the content view and all previous pages

[0034] In a possible design, the processing module is specifically configured to: if the sum of the offset and the screen height of the electronic device is greater than or equal to the coordinates of the content view, obtain the corresponding position of the content view according to the coordinates of the content view;

[0035] Obtain the display page from the content to be displayed according to the position of the content view.

[0036] In a possible design, the position of the content view includes the coordinates of the content view and / or the offset of the content view.

[0037] In a possible design, the processing module is specifically configured to:

[0038] Obtain the offset of the content view according to the offset and the coordinates of the floor of the blank view after scrolling;

[0039] And / or,

[0040] Obtain the coordinates of the content view according to the offset and the coordinates of the middle view of the blank view after scrolling.

[0041] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0042] A display, a processor; and,

[0043] A memory, configured to store executable instructions of the processor;

[0044] Wherein, the processor is configured to execute the processing method of the scrolling view according to any one of the embodiments of the first aspect by executing the executable instructions.

[0045] Fourthly, an embodiment of the present invention provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the processing method of the scroll view described in any implementation manner of the first aspect.

[0046] An embodiment of the present invention provides a processing method, device, equipment and storage medium for a scroll view. The electronic device obtains the total height required for the content to be displayed that needs to be displayed through the scroll view, generates a blank view according to the total height, and places the blank view into the scroll view. The electronic device obtains the offset amount of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen, obtains the coordinates of the content view after scrolling according to the blank view and the offset amount, and obtains the display page corresponding to the content view coordinates for display. The content to be displayed includes the content on the display page. Through the intermediate effect of the intermediate blank view, by dynamically adjusting the position of the content view, while using the linkage of the scroll view and the content view, and maintaining the memory reuse effect of the content view itself, the smooth scrolling of the mobile application is maintained and the memory occupancy is reduced. Description of the Drawings

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0048] Figure 1 It is a schematic flowchart of the first embodiment of the processing method of the scroll view shown according to an exemplary embodiment of the present invention;

[0049] Figure 2 It is a schematic flowchart of the second embodiment of the processing method of the scroll view shown according to an exemplary embodiment of the present invention;

[0050] Figure 3 It is a flowchart of an example of the processing method of the scroll view shown according to an exemplary embodiment of the present invention;

[0051] Figure 4 It is a schematic structural diagram of the processing device of the scroll view shown according to an exemplary embodiment of the present invention;

[0052] Figure 5 It is a schematic structural diagram of the electronic device shown according to an exemplary embodiment of the present invention. Detailed Embodiments

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0054] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0055] Regarding the two solutions for scrolling views provided by the prior art, the first technical implementation will cause the scrolling to stop forcibly, resulting in a sense of lag for the user and a poor user experience. The second technical implementation will write all content into memory, and the reuse mechanism of the web page (WebView) or the list (TableView) cannot be used, causing the memory to soar. If there is too much content, it will seriously lead to memory overflow and the application crashing, etc.

[0056] Regarding the above problems, a method for processing a scrolling view provided in this application is used to solve the problem of not performing gesture switching and not loading all content and achieving a normal scrolling effect.

[0057] The following will illustrate this solution through several specific embodiments.

[0058] Figure 1 It is a schematic flowchart of the first embodiment of the method for processing a scrolling view shown by the present invention according to an exemplary embodiment. As Figure 1 shown, this solution is applied to electronic devices such as mobile phones, tablet computers, and terminals in airport shopping malls. The method for processing a scrolling view provided in this embodiment includes:

[0059] Step S101, obtain the total height required for the content to be displayed that needs to be displayed through the scrolling view.

[0060] In this step, during the process of using the electronic device, the user may need to operate and view some web pages (UIWebView) or lists (UITableView), etc. However, the content to be displayed cannot be fully shown on one page of the electronic device screen. Therefore, it is necessary to monitor and obtain the total height required for the full display of the content to be displayed. Generally speaking, during the use of the application, the content is gradually obtained from the server, and the total height will change to a certain extent during the transmission process. Here, the total height that can be obtained is used as the standard. If the displayed content is updated and the total height changes, the subsequent process will be updated according to the changed total height.

[0061] Step S102: Generate a blank view according to the total height and place the blank view into the scroll view.

[0062] In this step, after the electronic device obtains the total height required to display the content to be displayed, it generates a blank view with the same height as the total height, and then places the blank view into the scroll view, that is, regards the blank view as the stretched total page to be displayed, but does not need to obtain and cache all the content at the same time.

[0063] Step S103: Obtain the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen.

[0064] In this step, after placing the blank view into the scroll view, the user performs a sliding operation on the touch screen to make the view displayed on the screen start to scroll. At this time, it is the blank view that is scrolling. After the operation stops, obtain the offset of the scroll view from before scrolling to after scrolling.

[0065] Step S104: Obtain the coordinates of the content view after scrolling according to the blank view and the offset.

[0066] In this step, the total height of the blank view is predetermined, and each position in it also has certain coordinates. Therefore, the electronic device can obtain the position on the blank view after scrolling according to the position of the blank view before scrolling and the offset, and then can obtain the coordinates of the content view after scrolling according to the corresponding relationship of the positions.

[0067] Step S105: Obtain the display page corresponding to the coordinates of the content view for display, and the content to be displayed includes the content on the display page.

[0068] The electronic device obtains the content on the corresponding page according to the obtained coordinates of the content view, that is, the display page, and displays it on the screen. The content on the obtained display page is a part of the original content to be displayed.

[0069] In the specific implementation of this solution, it should be understood that the display page includes at least the following two cases:

[0070] In the first case, a page at the position corresponding to the content view coordinates; the meaning of this solution is to obtain and display the content on the page corresponding to the content view coordinates, that is, the content before and after this page does not need to be obtained.

[0071] In the second case, a page at the position corresponding to the content view coordinates and all the previous pages. The meaning of this solution is to obtain all the content of the pages before the page corresponding to the content view coordinates in the content to be displayed, and after obtaining the content of these pages, it can be scrolled and displayed on the screen, and the content after this page does not need to be obtained temporarily.

[0072] In the processing method of the scroll view provided in this embodiment, the electronic device obtains the total height required for the content to be displayed, then generates a blank view according to the total height and places it in the scroll view. The scroll view starts to scroll according to the user's operation. The electronic device obtains the scrolling offset, then obtains the content view coordinates after scrolling according to the blank view and the offset, and then obtains the corresponding display page for display. Through the intermediate effect of the intermediate blank view, by dynamically adjusting the position of the content view, while using the linkage of the scroll view and the content view, and maintaining the memory reuse effect of the content view itself, the smooth scrolling of the mobile application is maintained and the memory occupancy is reduced.

[0073] Figure 2 It is a schematic flowchart of the second embodiment of the processing method of the scroll view shown by the present invention according to an exemplary embodiment. As Figure 2 shown, in the specific implementation of the above-mentioned first embodiment, obtaining the display page corresponding to the content view coordinates can be specifically implemented as:

[0074] Step S201: If the sum of the offset and the screen height of the electronic device is greater than or equal to the content view coordinates, obtain the corresponding content view position according to the content view coordinates.

[0075] Step S202: Obtain the display page from the content to be displayed according to the content view position.

[0076] In a specific implementation, the content view position includes the content view coordinates and / or the content view offset. By comparing the offset with the coordinates of the content view web page (UIWebView) or list (UITableView), in order to obtain the display requirement, it is necessary to determine whether the entire content view is displayed on the screen of the electronic device. It can be determined by whether the sum of the offset and the screen height of the electronic device is greater than or equal to the content view coordinates. When the sum of the offset and the screen height of the electronic device is greater than or equal to the content view coordinates, the position processing of the content view is started. That is, the corresponding content view position is obtained according to the content view coordinates, and then the display page is obtained from the content to be displayed according to the content view position.

[0077] Specifically, the method for obtaining the corresponding content view position according to the content view coordinates includes at least one of the following:

[0078] First, obtain the content view offset according to the offset and the coordinates of the floor of the blank view after scrolling;

[0079] Second, obtain the content view coordinates according to the offset and the coordinates of the middle view of the blank view after scrolling.

[0080] When continuing to scroll, update the coordinates of the content view on the middle blank view. By adjusting the coordinates, keep the content view Figure 1 always occupying the display on the screen, so that the content view will always be in the user's field of view. By updating the offset in the content view through these two solutions, the linkage of internal and external scrolling is realized, creating an illusion of the content view scrolling, thus achieving a smooth scrolling effect.

[0081] Based on the above several embodiments, taking the electronic device as a mobile phone, the processing method of the scroll view provided by the present invention will be exemplified below.

[0082] Without switching gestures, the user's swipe gesture can only be responded to on a ScrollView, and the content view cannot be stretched at the same time. Therefore, the height of the content view can only be set to the height of the mobile phone screen display. At this time, an intermediate blank view can be created, and the height of the blank view is set to the total height of all the content displayed by a WebView or a TableView. At the same time, the WebView or the TableView is placed on the intermediate blank view. When the ScrollView scrolls, the position of the WebView or the TableView on the intermediate blank view is adjusted at the same time, and the WebView or the TableView is controlled to scroll synchronously. The offset of the content view = the offset of the scroll view - the coordinates of the intermediate blank floor, causing a visual scroll, so as to achieve a smooth scrolling effect. The specific process of this solution is described below.

[0083] Figure 3 It is a flowchart of an example of the processing method of a scroll view shown by the present invention according to an example embodiment. As Figure 3 shown, the process includes:

[0084] Step S301: Obtain the total height required to display all the content to be displayed.

[0085] Step S302: Generate an intermediate blank view and add the intermediate view to the scroll view.

[0086] In the above two steps, generally, the content of a WebView or a TableView is relatively large, and the mobile phone screen cannot hold all the content. All the content needs to be fully displayed by scrolling. Therefore, first, through the system listening method, listen to the total height of the content of the WebView or the TableView, obtain the height required to display all the content, and set the height of the intermediate blank view to the obtained height. The total height obtained here may only be a part. After listening to the total height of the content again, the intermediate blank view can be updated according to the new total height according to the new total height. The content display of the mobile application is displayed through the coordinate system of the mobile phone system. Set the coordinates to be displayed of the intermediate blank view, which can be any position, and add it to the ScrollView.

[0087] Step S303: The scroll view starts to scroll to obtain the offset.

[0088] In this step, when the ScrollView scrolls, a scrolling offset is generated. The mobile phone can detect the scrolling and obtain the offset of the ScrollView in real time. Generally speaking, the offset of the ScrollView is the distance that the content on the ScrollView slides out of the screen in the coordinate system of the mobile phone system.

[0089] Step S304: Offset + screen height >= content view coordinates?

[0090] Step S305: Adjust the content view coordinates through the formula: content view coordinates = offset of the ScrollView - coordinates of the middle view.

[0091] Step S305: Adjust the offset of the content view through the formula: offset of the content view = offset of the ScrollView - coordinates of the middle blank floor.

[0092] In the above steps, the offset is used to compare the coordinate positions of the content view web page (UIWebView) or list (UITableView). When the content view web page (UIWebView) or list (UITableView) is fully displayed on the mobile phone screen, that is, the formula: offset + mobile phone screen height >= content view coordinates holds, and position processing of the content view begins. There are two processing methods. One is: obtain the content view coordinates based on the difference between the offset of the ScrollView and the middle view, and then adjust the content view coordinates displayed on the screen according to the content view coordinates; the other is: obtain the offset of the content view based on the difference between the offset of the ScrollView and the coordinates of the middle blank floor, and then adjust the offset of the content view displayed on the screen according to the offset of the content view. When continuing to scroll, update the coordinates of the content view on the middle blank view. By adjusting the coordinates, keep the content view always displayed on the screen, so that the content view will always be in the user's field of view. Through these two solutions, update the offset in the content view web page (UIWebView) or list (UITableView) to achieve the linkage of internal and external scrolling, creating the illusion of the content view scrolling, and thus achieving a smooth scrolling effect. Figure 1 Keep the content view always occupying the screen display, so that the content view will always be in the user's field of view. Update the offset in the content view web page (UIWebView) or list (UITableView) through these two solutions to achieve the linkage of internal and external scrolling, creating the illusion of the content view scrolling, and thus achieving a smooth scrolling effect.

[0093] In the processing method of the ScrollView of the present invention, by using the intermediate effect of the middle blank view, dynamically adjusting the position of the content view, simultaneously using the linkage of the ScrollView and the content view, and maintaining the memory reuse effect of the content view itself, the smoothness of the mobile phone application scrolling is maintained and the risk of memory overflow is reduced, improving the security and user experience of the application program.

[0094] Figure 4 It is a schematic structural diagram of a processing device for a ScrollView shown according to an exemplary embodiment of the present invention. As Figure 4As shown in the figure, the processing device 10 of the scroll view provided in this embodiment includes:

[0095] An acquisition module 11, configured to acquire the total height required for the content to be displayed that needs to be displayed through the scroll view;

[0096] A processing module 12, configured to generate a blank view according to the total height and place the blank view into the scroll view;

[0097] The processing module 12 is further configured to acquire the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen;

[0098] The processing module 12 is further configured to acquire the coordinates of the content view after scrolling according to the blank view and the offset;

[0099] A display module 13, configured to acquire the display page corresponding to the coordinates of the content view for display, where the content to be displayed includes the content on the display page.

[0100] The processing device of the scroll view provided in this embodiment is used to execute the technical solutions of any of the foregoing method embodiments. The implementation principles and technical effects are similar. The electronic device acquires the total height required for the content to be displayed, then generates a blank view according to the total height and places it into the scroll view. The scroll view starts to scroll according to the user's operation. The electronic device acquires the scrolling offset, then acquires the coordinates of the content view after scrolling according to the blank view and the offset, and then acquires the corresponding display page for display. Through the intermediate effect of the intermediate blank view, by dynamically adjusting the position of the content view, while using the linkage of the scroll view and the content view, and maintaining the memory reuse effect of the content view itself, the smoothness of the mobile application scrolling is maintained and the memory occupancy is reduced.

[0101] Based on the above embodiment, in the specific implementation of the processing device 10 of the scroll view, the display page includes:

[0102] A page at the position corresponding to the coordinates of the content view;

[0103] Or,

[0104] A page at the position corresponding to the coordinates of the content view and all previous pages

[0105] Optionally, the processing module 12 is specifically configured to: if the sum of the offset and the screen height of the electronic device is greater than or equal to the coordinates of the content view, acquire the corresponding content view position according to the coordinates of the content view;

[0106] Acquire the display page from the content to be displayed according to the content view position.

[0107] Optionally, the content view position includes content view coordinates and / or a content view offset.

[0108] Optionally, the processing module 12 is specifically configured to:

[0109] Obtain the content view offset according to the offset and the coordinates of the floor of the blank view after scrolling;

[0110] And / or

[0111] Obtain the content view coordinates according to the offset and the coordinates of the middle view of the blank view after scrolling.

[0112] The processing device for a scroll view provided in any of the foregoing embodiments is used to execute the technical solutions of any of the foregoing method embodiments, and the implementation principles and technical effects are similar, and will not be described in detail herein.

[0113] Figure 5 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment of the present invention. As Figure 5 shown, an electronic device 20 provided in this embodiment includes:

[0114] A display 21, a processor 22; and,

[0115] A memory 23 for storing executable instructions of the processor, and the memory 23 may also be a flash (flash memory);

[0116] Wherein, the processor 22 is configured to execute each step in the above method by executing the executable instructions. For specific reference, see the relevant descriptions in the foregoing method embodiments.

[0117] Optionally, the memory 23 may be either independent or integrated with the processor 22.

[0118] When the memory 23 is a device independent of the processor 22, the electronic device may further include:

[0119] A bus 24 for connecting the processor 22 and the memory 23.

[0120] This embodiment also provides a readable storage medium, in which a computer program is stored. When at least one processor of the electronic device executes the computer program, the electronic device executes the processing method for a scroll view provided in the above various embodiments.

[0121] This embodiment also provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and the execution of the computer program by at least one processor enables the electronic device to implement the processing method of the scroll view provided by the above various embodiments.

[0122] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disc that can store program codes.

[0123] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing a scroll view, characterized in that, Applied to an electronic device, the method includes: Obtain the total height required for the content to be displayed that needs to be displayed through a scroll view; Generate a blank view according to the total height and place the blank view into the scroll view; Obtain the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen; Obtain the coordinates of the content view after scrolling according to the blank view and the offset; Obtain the display page corresponding to the coordinates of the content view for display, where the content to be displayed includes the content on the display page; Obtaining the display page corresponding to the coordinates of the content view includes: If the sum of the offset and the screen height of the electronic device is greater than or equal to the coordinates of the content view, obtain the corresponding content view position according to the coordinates of the content view; Obtain the display page from the content to be displayed according to the content view position.

2. The method according to claim 1, characterized in that, The display page includes: One page at the position corresponding to the coordinates of the content view; Or, One page at the position corresponding to the coordinates of the content view and all previous pages.

3. The method according to claim 1, characterized in that, The content view position includes content view coordinates and / or content view offset.

4. The method according to claim 3, characterized in that, The obtaining the corresponding content view position according to the coordinates of the content view includes: Obtain the content view offset according to the offset and the coordinates of the floor of the blank view after scrolling; And / or, Obtain the content view coordinates according to the offset and the coordinates of the middle view of the blank view after scrolling.

5. A device for processing a scroll view, characterized in that, Includes: An obtaining module, configured to obtain the total height required for the content to be displayed that needs to be displayed through a scroll view; A processing module, configured to generate a blank view according to the total height and place the blank view into the scroll view; The processing module is further configured to obtain the offset of the scroll view from the start of scrolling to the end of scrolling according to the user's operation on the touch screen; The processing module is further configured to obtain the coordinates of the content view after scrolling according to the blank view and the offset; A display module, configured to obtain the display page corresponding to the coordinates of the content view for display, where the content to be displayed includes the content on the display page; The processing module is specifically configured to: if the sum of the offset and the screen height of the processing device is greater than or equal to the coordinates of the content view, obtain the corresponding content view position according to the coordinates of the content view; obtain the display page from the content to be displayed according to the content view position.

6. The device according to claim 5, characterized in that, The display page includes: One page at the position corresponding to the coordinates of the content view; Or, One page at the position corresponding to the coordinates of the content view and all previous pages.

7. The device according to claim 5, characterized in that, The content view position includes content view coordinates and / or content view offset.

8. The device according to claim 7, characterized in that, The processing module is specifically configured to: Obtain the content view offset according to the offset and the coordinates of the floor of the blank view after scrolling; And / or, Obtain the content view coordinates according to the offset and the coordinates of the middle view of the blank view after scrolling.

9. An electronic device, characterized in that, Includes: A display, a processor; And, A memory, configured to store the executable instructions of the processor; Wherein, the processor is configured to execute the processing method of the scroll view according to any one of claims 1 to 4 by executing the executable instructions.

10. A storage medium, on which a computer program is stored, characterized in that, When the program is executed by the processor, it implements the processing method of the scroll view according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for realizing content selection on the basis of scrolling widget and device

    CN102314282A

  • Operation interface display method and mobile terminal

    CN106126039A