将数组适配到ListView

1 public class TutListActivity extends ListActivity {   

2 @Override  

3  public void onCreate(Bundle savedInstanceState) {   

4 super.onCreate(savedInstanceState);   

5 setListAdapter(ArrayAdapter.createFromResource(getApplicationContext(), R.array.tut_titles, R.layout.list_item));   

6 }  

7 } 

http://mobile.51cto.com/android-266516_1.htm

 

 

你可能感兴趣的:(ListView)