任何人都有一个 Android ListView GreenDroid (GDListActivity) 的例子吗?
谢谢
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 扩展到您的活动,并将您的适配器链接到列表。