package com.codepath.simpletodo;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;


public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

@@ -27,16 +27,42 @@
 etodo;%0A%0A
+import android.os.Bundle;%0A
 import a
@@ -113,33 +113,33 @@
 ort android.
-os.Bundle
+view.Menu
 ;%0Aimport and
@@ -144,32 +144,36 @@
 ndroid.view.Menu
+Item
 ;%0Aimport android
@@ -177,240 +177,721 @@
 oid.
-view.MenuItem;%0A%0A%0Apublic class MainActivity extends ActionBarActivity %7B%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main
+widget.ArrayAdapter;%0Aimport android.widget.ListView;%0A%0Aimport java.util.ArrayList;%0A%0A%0Apublic class MainActivity extends ActionBarActivity %7B%0A    ArrayList%3CString%3E items;%0A    ArrayAdapter%3CString%3E itemsAdapter;%0A    ListView lvItems;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A%0A        lvItems = (ListView) findViewById(R.id.lvItems);%0A        items = new ArrayList%3CString%3E();%0A        itemsAdapter = new ArrayAdapter%3CString%3E(this,%0A                android.R.layout.simple_list_item_1, items);%0A%0A        lvItems.setAdapter(itemsAdapter);%0A        items.add(%22First Item%22);%0A        items.add(%22Second Item%22
 );%0A 

Add static items to the list view