我有http://developer.android.com/resources/tutorials/views/hello-listview.html教程,我想在另一个课程中做同样的事情。我不想在活动课上这样做!!!
问问题
92 次
2 回答
0
//you need to extends the Activity
and in your onCreate() method
you need to get the ListView id
ListView myListview=(ListView)findViewbyId(R.id.mylist);
myListview.setAdapter(...);
于 2012-06-04T15:39:37.320 回答
0
Lunch from an Activity your list view after getting reference to your listview widget by
ListView myListview=(ListView)findViewbyId(R.id.mylist);
in your layout after that bind data to your list view using Adapter by calling
myListview.setAdapter();
see this tutorial
and this one is a custom list view with icon
于 2012-06-04T15:40:23.983 回答