将数组适配到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

 

 

posted @ 2014-04-28 15:37  daishuguang  阅读(195)  评论(0编辑  收藏  举报