Search code examples
androidlistactivitygreendroid

Example of an Android ListView GreenDroid (GDListActivity)?


Anyone have an example of an Android ListView GreenDroid (GDListActivity)?

Thanks


Solution

  • 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");
        }
    }
    

    It's simple. Simple extend the GDListActivity to your activity, and link your adapter to the list.