Basic of ListView-data adapter resolution and listview Adapter

Source: Internet
Author: User

Basic of ListView-data adapter resolution and listview Adapter
Data adapter:

Purpose: Fill in complex data (array, linked list, database, set, etc.) on the specified view interface.
ArrayAdapter (array adapter): used to bind a single data format
Array Source: can be a set or Array
ArrayAdapter (context, the layout file and data source corresponding to each list item loaded by the current ListView ).
SimpleAdapter: used to bind complex data.
Data source: can only be a set of specific generic types
SimpleAdapter (context, a list set composed of a Map of the data source (each Map will correspond to a row in the listview list, the keys in each Map key-value pair must contain all the keys specified in from, the file resources corresponding to resours, from (the key name of Map ), to bind the data view ID and from
The data adapter serves as a bridge between the data source and the View Interface.
Implementation process: Create an adapter-Add a data source to the adapter-load the adapter in the view

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.