for the interview, it may be the problem of the ListView, always high-frequency appearance, after all, the development of his appearance is also high-frequency. I'll say first. Basic Optimization
ListView optimization1. Reuse to reduce memory consumption---->convertview to determine whether it is empty, not empty, directly re-use. Give him a layout when it's empty.
2. Reduce the number of lookup IDs-----> Define a Viewholder Storage control and then bind it to Convertview
For the above two, if you can use it in your project and extract the Viewholder into a separate class for reuse, the interviewer will have a better view of you.
Go ahead. If the data volume of the ListView is larger than the operation is still a bit of a problem than the chip processing this point in the next section, you can also directly joint image compression cache to display together to say
3. With large amounts of data, we can use page loading, and batch loading
At this point you need to elaborate on the steps of batch loading or you might want to get a high salary a little harder.
The implementation of the ListView batch loading:
The best answer is to talk with the project you wrote on your resume.
① implements the Onscrolllistener interface override Onscrollstatechanged and Onscroll methods, swipe with onscroll to check for data, If there is a Addfooterview added to adapter remember to brush it if it is not the custom footer removed, use onscrollstatechanged You can detect if you are rolling to the last row and stop scrolling to load data
Asynchronous Tasks Load network data1. Get the picture display from the memory cache first2. Get no more from SD,3. Download the picture from the network and save it in SD, add the memory and display it.
above three steps if you can tell the details, you can explain the source 1.1 points clearly tomorrow continue to write the next week to interview ....
Android Resume Technology Point-master the optimization of the ListView and asynchronous task load network data.