public int compare(Event event1, Event event2) {

    String myId = ConfigurationManager.instance.getMemberId();
    if (event1.getOrganizerId().equals(myId) && !event2.getOrganizerId().equals(myId)) return -1;
    else if (!event1.getOrganizerId().equals(myId) && event2.getOrganizerId().equals(myId))
      return 1;
    else return event1.getEventTime().compareTo(event2.getEventTime());
  }
  public View getView(int position, View convertView, ViewGroup parent) {
    Event event = (Event) data.get(position);
    String eventName = event.getName();
    if (newEventsList != null && newEventsList.contains(event.getId()))
      eventName = eventName + " - New!";

    Date eventDate = new Date(event.getUtcTime());
    String timeStr = eventDate != null ? " - " + subTextFormat.format(eventDate) : " - No Date";
    InfoRowView view =
        new InfoRowView(
            this.context,
            eventName,
            event.getGroupName() + timeStr,
            event.getPhotoURL(),
            Integer.valueOf(event.getId()));
    view.setOnClickListener(listener);
    return view;
  }
 public long getItemId(int position) {
   Event event = (Event) data.get(position);
   return Long.valueOf(event.getId());
 }