ITEEDU

直接用ListAvtivity

直接用ListAvtivity不用setContentView(),因为ListAvtivity就是用来显示列表的。只要配制好就行了。

public class ListTest extends ListActivity {
      /** Called when the activity is first created. */
     @Override
      public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
		……
         setListAdapter(adapter);
     }
 }