+ @Override
+ public View getView(final int position, final View convertView, final ViewGroup parent) {
+ final LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ final View rowView = inflater.inflate(R.layout.event_row_layout, parent, false);
+ final TextView title = (TextView) rowView.findViewById(R.id.smalleventtitle);
+ final TextView dstart = (TextView) rowView.findViewById(R.id.smalldatestart);
+ final TextView dend = (TextView) rowView.findViewById(R.id.smalldateend);
+ final View header = rowView.findViewById(R.id.rowHeader);
+ header.setBackgroundColor(events[position].eventColour);
+ title.setText(events[position].title);
+ dstart.setText(new Date(events[position].dtstart).toString());
+ dend.setText(new Date(events[position].dtend).toString());
+
+ return rowView;
+ }
+ }
+
+ private Event[] events;