public static void buildEventsFromCursor(ArrayList<Event> events,Cursor cEvents,Context context,int startDay,int endDay){
  if (cEvents == null || events == null) {
    Log.e(TAG,"buildEventsFromCursor: null cursor or null events list!");
    return;
  }
  int count=cEvents.getCount();
  if (count == 0) {
    return;
  }
  Resources res=context.getResources();
  mNoTitleString=res.getString(R.string.no_title_label);
  mNoColorColor=res.getColor(R.color.event_center);
  cEvents.moveToPosition(-1);
  while (cEvents.moveToNext()) {
    Event e=generateEventFromCursor(cEvents);
    if (e.startDay > endDay || e.endDay < startDay) {
      continue;
    }
    events.add(e);
  }
}

public static void buildEventsFromCursor ( ArrayList < Event > events , Cursor cEvents , Context context , int startDay , int endDay ) { if ( cEvents == null || events == null ) { Log . e ( TAG , "buildEventsFromCursor: null cursor or null events list!" ) ; return ; } int count = cEvents . getCount ( ) ; if ( count == 0 ) { return ; } Resources res = context . getResources ( ) ; mNoTitleString = res . getString ( R . string . no_title_label ) ; mNoColorColor = res . getColor ( R . color . event_center ) ; cEvents . moveToPosition ( - 1 ) ; while ( cEvents . moveToNext ( ) ) { Event e = generateEventFromCursor ( cEvents ) ; if ( e . startDay > endDay || e . endDay < startDay ) { continue ; } events . add ( e ) ; } }
adds all the events from the cursors to the events list .
