Android ListView Refresh lag issue

Source: Internet
Author: User

I have just contact with Android development, recently encountered a ListView refresh item has been stuck, the progress bar has been only refreshed two times the end, Gray often do not understand, all kinds of Baidu, all kinds of information, what threads have tried all over, but and eggs. All the way up to see a piece of information that mentions the Wrap_content attribute, which is exactly what this is based on the size of the content itself, only to find out that the problem is here.

Wrap_content according to the content of the adaptive size, you need to calculate the width of the item, if the parent is also this attribute, it will take a very long time to calculate, especially when the dynamic update item, the process will continue to do, So it is recommended to use a fixed size in the ListView, it is not possible to use fill_parent, but fill_parent is only faster than wrap_content.

Android ListView Refresh lag issue

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.