Content anomaly causes and solutions when the ListView is sliding

Source: Internet
Author: User

Today in the Lietview sliding, encountered a very wonderful problem, in order to describe the problem, first on

The problem is this, when I swipe the right side of the sidebar, will call the Liestview SetSelection method, sliding to the corresponding position, but it is not conceivable that some of the names of the contacts disappeared, only the last name, and all the letters under the first contact, For example, under C Chai June, there will be only one "firewood" left. If I comment out this line of code, there is no sliding effect, and of course there is no exception.

Telephonylistview.setselection (position);    

In order to further determine that this line of code caused, I changed a method test, the result is still an exception

Telephonylistview.scrollby (position);   

To determine the cause of the problem, I opened the listview.class, but because there is no source code, or do not see the details of the method, Miss under the elder sister, the final consideration is not due to the convertview of the problem caused by the re-use, because before also encountered Convertview re-use caused problems, and finally abandoned con in adapter The problem has been solved by the practice of vertview reuse.

Thus, I judge in the source code, the ListView's swipe or call the adapter refresh method, and the refresh time also do some processing, so that external calls may appear when the exception, but what is the reason, to download a source to dig into ...

Content anomaly causes and solutions when the ListView is sliding

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.