Android ListView GreenDroid(GDListActivity)示例?

时间:2011-09-04 20:57:42

标签: android listactivity greendroid

任何人都有Android ListView GreenDroid(GDListActivity)的例子吗?

由于

1 个答案:

答案 0 :(得分: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扩展到您的活动,并将您的适配器链接到列表。