package zero.zd.daily_event_logger;

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }

    @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) {
        switch(item.getItemId()) {
            case R.id.action_about:
                break;
        }
        return super.onOptionsItemSelected(item);
    }
}

@@ -49,15 +49,134 @@
 oid.
-os.Bund
+content.Context;%0Aimport android.os.Bundle;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullab
 le;%0A
@@ -368,24 +368,60 @@
 et.Toolbar;%0A
+import android.view.LayoutInflater;%0A
 import andro
@@ -489,16 +489,139 @@
 enuItem;
+%0Aimport android.view.ViewGroup;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.TextView;%0A%0Aimport java.util.List;
 %0A%0Apublic
@@ -1396,89 +1396,8 @@
 ) %7B%0A
-        // Inflate the menu; this adds items to the action bar if it is present.%0A
     
@@ -1647,32 +1647,32 @@
 reak;%0A        %7D%0A
-
         return s
@@ -1710,11 +1710,1781 @@
 );%0A    %7D
+%0A%0A    private class EventArrayAdapater extends ArrayAdapter%3CEvent%3E %7B%0A%0A        private Context mContext;%0A        private int mResource;%0A        private List%3CEvent%3E mEventList;%0A%0A        public EventArrayAdapater(Context context, int resource, List%3CEvent%3E eventList) %7B%0A            super(context, resource, eventList);%0A            mContext = context;%0A            mResource = resource;%0A            mEventList = eventList;%0A        %7D%0A%0A        @Override%0A        public int getCount() %7B%0A            return mEventList.size();%0A        %7D%0A%0A        @Nullable%0A        @Override%0A        public Event getItem(int position) %7B%0A            return mEventList.get(position);%0A        %7D%0A%0A        @NonNull%0A        @Override%0A        public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) %7B%0A%0A            ViewHolder viewHolder;%0A%0A            if (convertView == null) %7B%0A                LayoutInflater inflater = (LayoutInflater)%0A                        getSystemService(Context.LAYOUT_INFLATER_SERVICE);%0A                convertView = inflater.inflate(mResource, parent, false);%0A%0A                viewHolder = new ViewHolder();%0A                viewHolder.eventTextView = (TextView) findViewById(R.id.text_event);%0A                viewHolder.dateTextView = (TextView) findViewById(R.id.text_date);%0A%0A                convertView.setTag(viewHolder);%0A            %7D else viewHolder = (ViewHolder) convertView.getTag();%0A%0A            Event event = mEventList.get(position);%0A%0A            viewHolder.eventTextView.setText(event.getEvent());%0A            viewHolder.dateTextView.setText(event.getDate().toString());%0A%0A            return convertView;%0A        %7D%0A    %7D%0A%0A    private class ViewHolder %7B%0A        private TextView eventTextView;%0A        private TextView dateTextView;%0A    %7D
 %0A%7D%0A

Add EventArrayAdapter Class