The display and caching mechanism of the "Advanced Android" ListView

Source: Internet
Author: User

The ListView is a very important control in the Android UI control. It can be very intuitive to display a set of data, in practical applications is very extensive. The display and caching mechanism of the ListView is described below.

Here is a schematic of the ListView display caching mechanism:

  • The 1th part is the normal display of the ListView when a cell phone, because the mobile phone height is limited, so the data displayed is not too much, here shows 7 data; Similarly, because the memory resources of the mobile phone is limited, the ListView will not load all the data once and wait for you to slip, It will only load a portion of the screen that can be displayed;

  • The 2nd part is when we swipe up, Item1 is moved to the outside of the screen, when it is not visible, so the system puts it into the view buffer pool recycler;

  • At the same time ITEM8 needs to be loaded, so the system takes out the layout from the recycler buffer and fills it with data, showing the ITEM8, which is the 3rd part.

In summary, the display cache mechanism of the ListView is needed to display only display, after the display is retracted, the need-to-take caching mechanism greatly saves the system resources, so that the ListView can display tens of thousands of data.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The display and caching mechanism of the "Advanced Android" ListView

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.