Demo ListView and Xlistview (not organized)

Source: Internet
Author: User
Content of this article
  • Environment
  • Project structure
  • Demo 1
  • Demo 2
  • Demo 3
  • Demo 4
Environment
  • Windows R2 64-bit
  • Eclipse ADT v22.6.2,android 4.4.2 (API 19)
  • SAMSUNG gt-8618,android OS 4.1.2
Project structure

Figure 1 Project Structure

Figure 2 Main Program Interface

SimpleList demonstrates the simple JSON data that gets the music list from the network, the JSON data is an array and is loaded into the ListView control with Asynctask. and the corresponding adpter of the Listview stipulate that the network obtains the data, how to display each line.

and use Jsonarray to convert to a JSON array.

Simplexlist Demo

Demonstrates the Xlistview control on GitHub, a demonstration provided by GitHub Xlistview. The ListView provides drop-down updates and pull-up loading capabilities. The control also provides enable or disable for pull-down and pull-up operations, not all scenarios require this two operation at the same time.

Xlistivity Demo

Just based on the previous demo, changed the data to music, but disabled the update function.
For simplicity, only one network is accessed, the data is cached, and the data is loaded repeatedly as it loads more.

Xlistanother Demo

is to simulate multiple accesses to the network on the basis of the previous demo, so that the pull-up loads more. The data is duplicated.


This demo, called multiple asynctask, does not know if this is possible, but Android does not seem to recommend this.

Download Demo

Demo ListView and Xlistview (not organized)

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.