Android ListView cannot display content

Source: Internet
Author: User
  1. Adapter call Flush interface has no effect:

Print the adapter GetView method, print the adapter GetCount () method, and print out the ToString () field of the data source.

When comparing the initial creation, you have to analyze whether there is no data, whether the data source reference has changed (GetCount () or the GetView () method does not execute);

2. The ListView cannot display the content:

The first thing to detect is whether your adapter data source really has a data source (detect GetCount () and GetView () method);

      The second is to detect whether your ListView reference and adapter reference has changed (in many cases, this is confusing, if the reference address of adapter has changed, the data source binding fails, how to refresh the results);

Android ListView cannot display content

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.