CN112272329A - Method for accelerating display speed of android list - Google Patents

Method for accelerating display speed of android list Download PDF

Info

Publication number
CN112272329A
CN112272329A CN202011171678.8A CN202011171678A CN112272329A CN 112272329 A CN112272329 A CN 112272329A CN 202011171678 A CN202011171678 A CN 202011171678A CN 112272329 A CN112272329 A CN 112272329A
Authority
CN
China
Prior art keywords
list
focus
rolling
distance
scrolling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011171678.8A
Other languages
Chinese (zh)
Other versions
CN112272329B (en
Inventor
王�琦
魏代邦
张晓刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haikan Network Technology Shandong Co ltd
Original Assignee
Haikan Network Technology Shandong Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haikan Network Technology Shandong Co ltd filed Critical Haikan Network Technology Shandong Co ltd
Priority to CN202011171678.8A priority Critical patent/CN112272329B/en
Publication of CN112272329A publication Critical patent/CN112272329A/en
Application granted granted Critical
Publication of CN112272329B publication Critical patent/CN112272329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
    • H04N21/8153Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics comprising still images, e.g. texture, background image

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to a method for accelerating the display speed of an Android list in IPTV application, which comprises the following steps: the layout of the list adopts a GridLayoutManager layout manager, and the initial focus falls on the first element; modifying the processing logic when the focus moves by self-defining a list class BaseRecyclerView; when the focus moves, obtaining the rolling offset through an offset algorithm, and immediately triggering rolling; by defining a method for processing scrolling by a list BaseRecyclerView, after each time of focus movement is finished, elements which can acquire a focus after the next focus movement are already present in a visual area, and combining a Glide processing mode, the loading of pictures is suspended when a long key is pressed down, and the loading of the pictures is continued when the long key is lifted up. The quick rolling of the list can be realized on the premise of not influencing the function; and by matching with a slide-based picture loading scheme, pictures are suspended and loaded in the process of fast scrolling, and the list scrolling fluency is further improved.

Description

Method for accelerating display speed of android list
Technical Field
The invention relates to the technical field of network televisions, in particular to a method for accelerating the display speed of an android list.
Background
IPTV, also called interactive network television, is a brand-new technology that utilizes the infrastructure of broadband network, uses home television or computer as main terminal equipment, integrates multiple technologies such as internet, multimedia, communication, etc., and provides multiple interactive digital media services including digital television to home users through Internet Protocol (IP). In recent years, IPTV is widely recognized at home and abroad as the most valuable service in the process of three-network convergence. Compared with a non-interactive digital television, the IPTV can provide various forms of content services, really realizes interaction with a user, and solves the problem of flexibility in transmission.
Android is a Linux-based operating system with free and open source codes, which is mainly used in mobile devices such as smart phones and tablet computers, and is led and developed by Google corporation and the open mobile alliance. At present, the Android platform basically realizes full coverage on an IPTV set top box.
List components ListView and RecycleView of the Android system and related third-party packaging tools provide convenience for the development of lists in the Android. Compared with ListView, RecycleView has obvious advantages in the aspects of caching processing, layout optimization, animation effect, local refreshing and the like, but the IPTV application uses a list rendered by the RecycleView, and calls the scalBy () and smoothScrolBy () to realize the scrolling of the page through a requestChildRectlandgleOnScreen () method when the focus moves by default. When focus moves out of the viewable area, the RecycleView first creates/binds the corresponding view and then generates a scrolling animation to make the view visible. When a key is pressed for a long time, the RecyclerView needs to rapidly create/bind the view, and if the creation/binding time is longer, users feel that the card is blocked, the effect is not smooth, the picture loading is delayed and the like (especially on a set top box with poor performance).
Disclosure of Invention
In order to overcome the defects, the invention aims to provide a method for accelerating the Android list display speed in IPTV application.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for accelerating Android list display speed in IPTV application comprises the following steps:
the layout of the list adopts a GridLayoutManager layout manager, and the initial focus falls on the first element;
modifying the processing logic when the focus moves by self-defining a list class BaseRecyclerView;
when the focus moves, obtaining the rolling offset through an offset algorithm, and immediately triggering rolling;
by defining a method for processing scrolling by a list BaseRecyclerView, after each time of focus movement is finished, elements which can acquire a focus after the next focus movement are already present in a visual area, and combining a Glide processing mode, the loading of pictures is suspended when a long key is pressed down, and the loading of the pictures is continued when the long key is lifted up.
Specifically, the custom list class BaseRecyclerView inherits the RecyclerView, the layout of the list adopts a GridLayoutManager layout manager, and the initial focus falls on the first element.
Specifically, the method for processing scrolling by the definition list baserecicverview includes:
by rewriting the focusSearch method, a focus movement event can be monitored, and the next focus element can be obtained;
blocking default scrolling logic caused by focus movement by rewriting the scrollBy and smothScrollby methods;
when the focus moves, the next focus element is in the visible area, and the rolling offset is obtained through an offset algorithm;
the method comprises the steps of calling a smoothScrollBy smooth rolling method of RecyclerView to realize rolling offset;
simultaneously declaring a Boolean type state variable isLongPress for BaseRecyclerView to record whether the state variable is in a long-press state, and obtaining whether the state variable is in the long-press state currently through a key monitoring method of Android;
adding an OnScrollListener rolling monitor to BaseRecycleView to monitor the rolling state of the list;
when the list is in a rolling state, calling a Glide pause loading method, and pausing and loading all pictures; when the list is in an idle state, calling a Glide loading recovery method, loading all pictures in the current visible area, and simultaneously setting the long press state isLongPress as non-long press;
when scrolling according to the calculated offset, if the long-press state is currently in, the scrollBy is called instead of the smoothScrollBy to obtain a smoother sliding effect.
Specifically, in the key monitoring method, whether the current key is a long key is judged, if yes, the flag isLongPress is set to true, a scrollBy method of RecycleView is called, and non-smooth scrolling is executed; if the event is not a long press event, namely isLongPress is false, the smoothScrollBy method of RecyclerView is called to execute smooth scrolling.
Specifically, the distance from the first element of the layout of the list to the left of the list is referred to as fitX, the distance from the first element of the list to the top of the list is referred to as fitY, the initialized values of fitX and fitY are negative ones, the distance from the left to any element of the list is referred to as left, and the distance from the top is referred to as top.
Specifically, the custom list baserecicview rolling offset algorithm includes:
a list item acquisition focus;
acquiring a first visible element from the current list;
judging whether both fitX and fitY are smaller than zero, if so, indicating that the list acquires a focus for the first time, wherein the first element of the list acquires the focus under the condition that the list does not need to be rolled; calculating the values of fitX and fitY according to the first visible element of the list, wherein the step is only executed once when the list acquires the focus for the first time, and then both the fitX and the fitY are more than or equal to zero, and the algorithm is ended after the step is executed;
when at least one of fitX and fitY is more than or equal to zero, the rolling distance of the list needs to be calculated, whether the list uses longitudinal or transverse layout is judged, the rolling direction of each layout is different, and after the corresponding rolling distance is calculated, a rolling method is called.
Specifically, when the vertical layout is used, whether the distance top of the focus element from the top of the list is equal to fitY is compared, if the distance top is equal, the focus element is located in the first row of the list, no scrolling is needed, and the algorithm is ended; if they are not equal, it is indicated that the focus element is not in the first row of the list, and the vertical scroll distance y needs to be calculated: -top-fitY; calling a rolling method, wherein the rolling value is that the transverse distance is 0, and the longitudinal distance is y;
when the horizontal layout is used, comparing whether the distance left between the focus element and the left side of the list is equal to the fitX, if so, ending the algorithm, wherein the focus element is positioned in the first column of the list and does not need to be scrolled; if they are not equal, it is indicated that the focus element is not in the first column of the list, and the lateral scroll distance x needs to be calculated: x is left-fitY; and calling a rolling method, wherein the rolling value is that the transverse distance is x, and the longitudinal distance is 0.
The invention has the following beneficial effects: the application provides a method for increasing the display speed of an Android list in IPTV application, which can realize the quick scrolling of the list on the premise of not influencing the function. Particularly, the problems of obvious unsmooth jamming and unsmooth rolling caused by the use of RecyclerView when a user presses a key for a long time are solved. And by matching with a slide-based picture loading scheme, pictures are suspended and loaded in the process of fast scrolling, and the list scrolling fluency is further improved.
Drawings
FIG. 1 is a schematic diagram of the focus movement before the list of the present invention is improved.
FIG. 2 is a diagram illustrating focus movement after improvement of the present invention.
FIG. 3 is a timing diagram of custom list BaseRecyclerView processing scrolling and pictures of the present invention.
FIG. 4 is a schematic diagram of a list view area according to the present invention.
FIG. 5 is a flow chart of the custom list BaseRecyclerView scroll offset algorithm of the present invention.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, which is a schematic view of scrolling when a focus of a cycleview in the prior art moves, as in fig. 1, the focus defaults to stay on a first list item, namely, a list item 1, and when the focus moves downward for the first time, the focus moves to a list item 6 of a second alignment list, and the list does not scroll; when the focus moves down again, the list scrolls up, the five list items of the first row (list items 1 to 5) disappear, the five list items of the third row (list items 11 to 15) appear, and the focus finally stays on the list item 11 of the third alignment list.
Fig. 2 is a schematic view illustrating scrolling when the focus of the BaseRecyclerView of the present invention is moved, the focus of fig. 1 is stopped on the first list item by default, i.e., the first list item, when the focus is moved down for the first time, the list is scrolled upwards, five list items in the first row disappear (list items 1 to 5), five list items in the third row (list items 11 to 15) are displayed, and finally the focus is stopped on the list item 6; when the focus moves downwards again, the list scrolls upwards again, the five list items (list items 6 to 10) in the second row disappear, the five list items (list items 16 to 21) in the fourth row are displayed, and finally the focus stays on the list item 11; i.e. when the focus is moved downwards, the focus stays somewhere in the first row, if there are still unloaded data items.
A method for accelerating the Android list display speed in IPTV application comprises the following steps:
modifying the processing logic when the focus moves by self-defining a list class BaseRecyclerView;
when the focus moves, obtaining the rolling offset through an offset algorithm, and immediately triggering rolling;
through the process of controlling the scrolling, after each time the focus movement is finished, elements of the focus which can be acquired after the next focus movement appear in the visible area, and the loading of the picture is suspended when the long key is pressed and the loading of the picture is continued when the long key is lifted by combining the processing mode of Glide.
As shown in fig. 3, the custom list baserecicliceview processes scrolling and picture timing diagrams, including the following steps:
1.1, when an application tries to display a page containing a list, invoking an initialization method of a custom list BaseRecyclerView by Activity of the list;
1.2, in the initialization method of the user-defined list BaseRecyclerView, a rolling monitor is added to the user-defined list BaseRecyclerView and is used for acquiring the rolling condition of the list and carrying out logic processing;
1.3, operating a remote control direction key in a custom list BaseRecyclerView by a user, wherein the remote control direction key may be a direction key clicked once or a direction key pressed for a long time;
1.4, receiving a remote control key signal by an Android frame, and finally calling a key monitoring method of a custom list BaseRecyclerView;
1.5, in the key monitoring method, judging whether the current key is a long key or not, and if so, setting a flag bit isLongPress to true;
1.6, after the Android frame calls a key monitoring method of the custom list BaseRecyclerView, continuing to call a focus searching method focusSearch of the custom list BaseRecyclerView through a series of internal processing;
1.7, customizing a focus searching method focusssearch of a list BaseRecyclerView, obtaining a next focus element through the focusssearch method of a parent RecyclerView, and calling a rolling offset algorithm of the focus element to obtain a rolling offset;
1.8, self-defining a list BaseRecyclerView to call a rolling method of a parent RecyclerView, rolling the list with specified offset according to the rolling offset obtained in the step 1.7, and calling a scrollBy method of the RecyclerView to execute non-smooth rolling if the current long press event is a long press event, namely isLongPress is true according to the result of the step 1.5; if the event is not a long press event, namely isLongPress is false, calling a smoothScrollBy method of RecyclerView to execute smooth rolling, and ensuring non-blocking of rolling on the long press and fluency of rolling on a single press by calling different modes;
1.9, while the step 1.8 is performed, after the customized list BaseRecyclerView finishes the step 1.7, returning the searched and obtained focus element, continuing to obtain the focus element by the Android frame, continuing to execute a default behavior, finally calling a scrolling method scrollBy the customized list BaseRecyclerView or smoothscrollby, and rewriting the scrollBy the customized list BaseRecyclerView and smoothscrollby if the default scrolling behavior is not executed any more because the step 1.8 triggers scrolling;
1.10, the Android frame responds to the scrolling method in the step 1.8, so that the customized list BaseRecyclerView is truly scrolled, and the Android frame recalls the scrolling callback method defined by the customized list BaseRecyclerView in the step 1.2 in the scrolling process and after the scrolling is finished;
1.11, in the scroll callback method, judging the current scroll state, and when the current scroll state is in the scroll state, pausing the loading of the picture by a Glide method; when the list is in a scrolling ending state, firstly setting a state variable isLongPress to false, namely when the list scrolling is stopped, ending one time of long pressing, and simultaneously resuming the picture loading by a Glide method, and loading the picture for the list item of the customized list BaseRecyclerView in the current visible area.
As shown in fig. 4, the flow chart of the custom list BaseRecyclerView scroll offset algorithm is as follows:
first, the distance from the first element of the list to the left of the list is called fitX, the distance from the first element of the list to the top of the list is called fitY, the initialized values of fitX and fitY are negative ones, the distance from the left to any element of the list is called left, and the distance from the top is called top.
As shown in fig. 5, the flow chart of the custom list BaseRecyclerView rolling offset algorithm specifically includes the following steps:
2.1, when a certain list item of the list obtains a focus, calling a subsequent rolling offset algorithm and triggering rolling;
2.2, acquiring a first visible element from the current list;
2.3, judging whether both fitX and fitY are smaller than zero, if so, indicating that the list acquires a focus for the first time, wherein the first element of the list acquires the focus under the condition that the list does not need to be rolled;
and 2.4, calculating the values of fitX and fitY according to the first visible element of the list, wherein the step is only executed once when the list acquires the focus for the first time, and then both the fitX and the fitY are larger than or equal to zero, and the algorithm is ended after the step is executed.
2.5, when at least one of fitX and fitY is more than or equal to zero, the rolling distance of the list needs to be calculated, whether the list uses longitudinal layout or transverse layout is judged, and the rolling direction of each layout is different;
2.6, when the longitudinal layout is used, comparing whether the distance top of the focus element and the top of the list is equal to fitY, if so, indicating that the focus element is positioned on the first line of the list, and ending the algorithm without scrolling;
2.7, in step 2.6, if they are not equal, it is indicated that the focus element is not in the first row of the list, and the longitudinal scroll distance y needs to be calculated: -top-fitY;
2.8, calling a rolling method, wherein the rolling value is that the transverse distance is 0, and the longitudinal distance is y;
2.9, when the horizontal layout is used, comparing whether the distance left between the focus element and the left side of the list is equal to the fitX, if so, ending the algorithm, wherein the focus element is positioned in the first column of the list and does not need to be scrolled;
2.10, if they are not equal, indicating that the focus element is not in the first column of the list, the lateral scroll distance x needs to be calculated: x is left-fitY;
2.11, following the step 2.10, calling a rolling method in the same way in the step 2.8, wherein the rolling value is that the transverse distance is x, and the longitudinal distance is 0.
The following embodiments are related to the longitudinal layout
A method for accelerating the display speed of an android list comprises the following steps:
step one, the user-defined list class BaseRecyclerView inherits the RecyclerView. The layout of the list adopts a GridLayoutManager layout manager, taking the vertical layout as an example, in a visible area of the RecycleView, more than two lines of elements exist, and the initial focus falls on the first element.
And secondly, the BaseRecyclerView can monitor the focus moving event and obtain the next focus element by rewriting the focusssearch method.
Step three, BaseRecyclerView can block default scrolling logic caused by focus movement by rewriting the scrollBy (non-smooth scrolling) and smontScrollBy (smooth scrolling) methods.
And step four, when the focus moves downwards, the next focus element is in the visible area. By calculating: the distance to the next focus element from the top of the RecycleView to top of top1, and the distance to the current focus element from the top of the RecycleView to top of top2, the offset y of the scroll is derived as top 1-top 2.
And fifthly, the offset of the rolling y is realized by calling a smoothScrollBy smooth rolling method of RecyclerView.
And step six, simultaneously declaring a Boolean type state variable isLongPress for BaseRecyclerView, and recording whether the state variable isLongPress is in a long press state. Whether the key is in the long-press state currently can be known through the Android key monitoring method.
And step seven, adding an OnScrollListener rolling monitor to the BaseRecycleView to monitor the rolling state of the list.
And step eight, calling a Glide pause loading method when the list is in a rolling state, and pausing and loading all the pictures. And when the list is in an idle state, calling a Glide loading recovery method, loading all pictures in the current visible area, and simultaneously setting the long press state isLongPress as non-long press.
Step nine, when the rolling is carried out according to the calculated offset, if the long press state is currently carried out, the scrollBy is called instead of the smoothScrollby, so as to obtain a smoother sliding effect.
The present invention is not limited to the above embodiments, and any structural changes made under the teaching of the present invention shall fall within the protection scope of the present invention, which is similar or similar to the technical solutions of the present invention.
The techniques, shapes, and configurations not described in detail in the present invention are all known techniques.

Claims (7)

1. A method for accelerating the Android list display speed in IPTV application is characterized in that: the method comprises the following steps:
the layout of the list adopts a GridLayoutManager layout manager, and the initial focus falls on the first element;
modifying the processing logic when the focus moves by self-defining a list class BaseRecyclerView;
when the focus moves, obtaining the rolling offset through an offset algorithm, and immediately triggering rolling;
by defining a method for processing scrolling by a list BaseRecyclerView, after each time of focus movement is finished, elements which can acquire a focus after the next focus movement are already present in a visual area, and combining a Glide processing mode, the loading of pictures is suspended when a long key is pressed down, and the loading of the pictures is continued when the long key is lifted up.
2. The method for accelerating the display speed of the Android list in the IPTV application according to claim 1, wherein: the user-defined list class BaseRecycleView inherits the RecycleView, the layout of the list adopts a GridLayoutManager layout manager, and the initial focus falls on the first element.
3. The method for accelerating the display speed of the Android list in the IPTV application according to claim 1, wherein: the method for processing the scrolling by the definition list BaseRecyclerView comprises the following steps:
by rewriting the focusSearch method, a focus movement event can be monitored, and the next focus element can be obtained;
blocking default scrolling logic caused by focus movement by rewriting the scrollBy and smothScrollby methods;
when the focus moves, the next focus element is in the visible area, and the rolling offset is obtained through an offset algorithm;
the method comprises the steps of calling a smoothScrollBy smooth rolling method of RecyclerView to realize rolling offset;
simultaneously declaring a Boolean type state variable isLongPress for BaseRecyclerView to record whether the state variable is in a long-press state, and obtaining whether the state variable is in the long-press state currently through a key monitoring method of Android;
adding an OnScrollListener rolling monitor to BaseRecycleView to monitor the rolling state of the list;
when the list is in a rolling state, calling a Glide pause loading method, and pausing and loading all pictures; when the list is in an idle state, calling a Glide loading recovery method, loading all pictures in the current visible area, and simultaneously setting the long press state isLongPress as non-long press;
when scrolling according to the calculated offset, if the long-press state is currently in, the scrollBy is called instead of the smoothScrollBy to obtain a smoother sliding effect.
4. The method for accelerating the display speed of the Android list in the IPTV application according to claim 1, wherein: in the key monitoring method, whether the current key is a long key is judged, if yes, the flag bit isLongPress is set to true, and a scrollBy method of RecycleView is called to execute non-smooth rolling; if the event is not a long press event, namely isLongPress is false, the smoothScrollBy method of RecyclerView is called to execute smooth scrolling.
5. The method for accelerating the display speed of the Android list in the IPTV application according to claim 1, wherein: the distance of the first element of the layout of the list from the left of the list is called fitX, the distance of the first element of the list from the top of the list is called fitY, the initialized values of fitX and fitY are negative ones, the distance from the left to any element of the list is called left, and the distance from the top is called top.
6. The method for accelerating the display speed of the Android list in the IPTV application according to claim 1, wherein: the custom list BaseRecyclerView rolling offset algorithm comprises the following steps:
a list item acquisition focus;
acquiring a first visible element from the current list;
judging whether both fitX and fitY are smaller than zero, if so, indicating that the list acquires a focus for the first time, wherein the first element of the list acquires the focus under the condition that the list does not need to be rolled; calculating the values of fitX and fitY according to the first visible element of the list, wherein the step is only executed once when the list acquires the focus for the first time, and then both the fitX and the fitY are more than or equal to zero, and the algorithm is ended after the step is executed;
when at least one of fitX and fitY is more than or equal to zero, the rolling distance of the list needs to be calculated, whether the list uses longitudinal or transverse layout is judged, the rolling direction of each layout is different, and after the corresponding rolling distance is calculated, a rolling method is called.
7. The method for accelerating the display speed of the Android list in the IPTV application according to claim 6, wherein: when the longitudinal layout is used, comparing whether the distance top of the focus element and the list is equal to fitY or not, if so, indicating that the focus element is positioned on the first line of the list, and the algorithm is ended without scrolling; if they are not equal, it is indicated that the focus element is not in the first row of the list, and the vertical scroll distance y needs to be calculated: -top-fitY; calling a rolling method, wherein the rolling value is that the transverse distance is 0, and the longitudinal distance is y;
when the horizontal layout is used, comparing whether the distance left between the focus element and the left side of the list is equal to the fitX, if so, ending the algorithm, wherein the focus element is positioned in the first column of the list and does not need to be scrolled; if they are not equal, it is indicated that the focus element is not in the first column of the list, and the lateral scroll distance x needs to be calculated: x is left-fitY; and calling a rolling method, wherein the rolling value is that the transverse distance is x, and the longitudinal distance is 0.
CN202011171678.8A 2020-10-28 2020-10-28 Method for accelerating display speed of android list Active CN112272329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011171678.8A CN112272329B (en) 2020-10-28 2020-10-28 Method for accelerating display speed of android list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011171678.8A CN112272329B (en) 2020-10-28 2020-10-28 Method for accelerating display speed of android list

Publications (2)

Publication Number Publication Date
CN112272329A true CN112272329A (en) 2021-01-26
CN112272329B CN112272329B (en) 2023-02-28

Family

ID=74345089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011171678.8A Active CN112272329B (en) 2020-10-28 2020-10-28 Method for accelerating display speed of android list

Country Status (1)

Country Link
CN (1) CN112272329B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225602A (en) * 2021-05-27 2021-08-06 Vidaa美国公司 Display equipment and control method for loading and displaying television homepage content
CN114217724A (en) * 2022-02-14 2022-03-22 北京智象信息技术有限公司 Method, system and medium for displaying and interacting long list data in TV application
CN114879892A (en) * 2022-04-21 2022-08-09 深圳市绿联科技股份有限公司 Data sliding display method and device and electronic equipment
CN115828003A (en) * 2021-01-28 2023-03-21 腾讯科技(深圳)有限公司 Information display method and device, storage medium and computer equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107224A1 (en) * 2014-12-29 2016-07-07 深圳Tcl新技术有限公司 Method and device for controlling movement of interface focus
CN105847930A (en) * 2016-03-22 2016-08-10 乐视网信息技术(北京)股份有限公司 Focus frame control method and device
CN107087234A (en) * 2017-03-30 2017-08-22 武汉斗鱼网络科技有限公司 A kind of focus control method and system
WO2019052524A1 (en) * 2017-09-14 2019-03-21 腾讯科技(深圳)有限公司 View rendering method and apparatus, medium, and intelligent terminal
CN109669740A (en) * 2018-09-25 2019-04-23 平安科技(深圳)有限公司 List loading method, device, equipment and computer readable storage medium
CN110286973A (en) * 2019-05-14 2019-09-27 深圳康佳电子科技有限公司 A kind of key trigger event processing method, intelligent terminal and storage medium
CN110955425A (en) * 2018-09-26 2020-04-03 珠海横琴盛达兆业科技投资有限公司 Method for realizing symmetry of RecyclerView grid layout based on Android platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107224A1 (en) * 2014-12-29 2016-07-07 深圳Tcl新技术有限公司 Method and device for controlling movement of interface focus
CN105847930A (en) * 2016-03-22 2016-08-10 乐视网信息技术(北京)股份有限公司 Focus frame control method and device
CN107087234A (en) * 2017-03-30 2017-08-22 武汉斗鱼网络科技有限公司 A kind of focus control method and system
WO2019052524A1 (en) * 2017-09-14 2019-03-21 腾讯科技(深圳)有限公司 View rendering method and apparatus, medium, and intelligent terminal
CN109669740A (en) * 2018-09-25 2019-04-23 平安科技(深圳)有限公司 List loading method, device, equipment and computer readable storage medium
CN110955425A (en) * 2018-09-26 2020-04-03 珠海横琴盛达兆业科技投资有限公司 Method for realizing symmetry of RecyclerView grid layout based on Android platform
CN110286973A (en) * 2019-05-14 2019-09-27 深圳康佳电子科技有限公司 A kind of key trigger event processing method, intelligent terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智玲君: "安卓项目实战之:开源框架BaseRecyclerViewAdapterHelper的使用", 《HTTPS://BLOG.CSDN.NET/GPF1320253667/ARTICLE/DETAILS/84245155》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115828003A (en) * 2021-01-28 2023-03-21 腾讯科技(深圳)有限公司 Information display method and device, storage medium and computer equipment
CN113225602A (en) * 2021-05-27 2021-08-06 Vidaa美国公司 Display equipment and control method for loading and displaying television homepage content
CN114217724A (en) * 2022-02-14 2022-03-22 北京智象信息技术有限公司 Method, system and medium for displaying and interacting long list data in TV application
CN114879892A (en) * 2022-04-21 2022-08-09 深圳市绿联科技股份有限公司 Data sliding display method and device and electronic equipment

Also Published As

Publication number Publication date
CN112272329B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN112272329B (en) Method for accelerating display speed of android list
US10805661B2 (en) Systems and methods for enabling transitions between items of content
US20180373804A1 (en) Method and device for loading information stream page
US20130332535A1 (en) Capture and recall of home entertainment system session
CN111629409B (en) Call control method and device and electronic equipment
WO2022089330A1 (en) Method for taking screenshot, apparatus, electronic device, and readable storage medium
US20080184128A1 (en) Mobile device user interface for remote interaction
CN107846617B (en) Interaction method of intelligent terminal and intelligent television
WO2021031707A1 (en) Method for displaying message on smart television, and smart television
CN105630452A (en) Screen transmission method and electronic devices
US11652763B2 (en) Information display method and apparatus, and electronic device
CN112751971A (en) Voice playing method and device and electronic equipment
WO2021244666A1 (en) Video playing control method and apparatus, and computer device and storage medium
CN104391636A (en) Screenshot method and device
US11265621B2 (en) Video push method, device and computer-readable storage medium
US20170195734A1 (en) Systems and methods for enabling transitions between items of content based on multi-level gestures
CN111083568A (en) Video data processing method and electronic equipment
CN107018137A (en) A kind of Flash reorientation methods and device
CN112711366A (en) Image generation method and device and electronic equipment
CN105872701A (en) Method and mobile terminal for realizing video playing control
CN107402691A (en) Display methods, display device and the computer-readable recording medium of terminal cursor
CN104038847A (en) IPTV-based network video broadcasting control method and apparatus
CN106547502A (en) A kind of display packing of information content and corresponding terminal unit
CN112738620A (en) Media resource screen projection method, equipment and system
CN112565666A (en) Method and system for quickly viewing desktop shared historical content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant