2011-09-04 80 views

回答

1
public class MoodleUcTarefasActivity extends GDListActivity { 

    private MoodleEventAdapter eventAdapter = null; 
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     this.initActionBar(); 

     if (eventAdapter == null) 
      eventAdapter = new MoodleEventAdapter(this); 
     setListAdapter(eventAdapter); 

    } 

private void initActionBar() { 
     setTitle("Your action bar title"); 
    } 
} 

很簡單。簡單地將GDListActivity擴展到您的活動,並將您的適配器鏈接到列表。

+0

這很完美。謝謝 – itaravika