Three types of analytical Adapter

一.ArrayAdapter

   Processing a single text message

= ListView the ListView the findViewById (R.id.list_view1); 
String [] Data = {AA, BB, CC, ...}; 
the ArrayAdapter Adapter = new new the ArrayAdapter (the Content: the this , R.layout.item, Data);
 // parameter 1: environmental context the this parameter represents the applied data item layout, the parameter data source 3 (array). 
listView.setAdapter (Adapter);
 // wherein the outermost layer R.layout.item TextView wrapped, because the data need to show up in the data in this layout.

二.SimpleAdapter

 

 

Three .BaseAdapter

Guess you like

Origin www.cnblogs.com/niconotine/p/12127572.html