code: private void computePositionOfEvents(List<EventRect> eventRects) {
          // Make "collision groups" for all events that collide with others.
          List<List<EventRect>> collisionGroups = new ArrayList<List<EventRect>>();
          for (EventRect eventRect : eventRects) {
              boolean isPlaced = false;
  
              outerLoop:
              for (List<EventRect> collisionGroup : collisionGroups) {
                  for (EventRect groupEvent : collisionGroup) {
                      if (isEventsCollide(groupEvent.event, eventRect.event) && groupEvent.event.isAllDay() == eventRect.event.isAllDay()) {
                          collisionGroup.add(eventRect);
                          isPlaced = true;
                          break outerLoop;
                      }
                  }
              }
  
              if (!isPlaced) {
                  List<EventRect> newGroup = new ArrayList<EventRect>();
                  newGroup.add(eventRect);
                  collisionGroups.add(newGroup);
              }
          }
  
          for (List<EventRect> collisionGroup : collisionGroups) {
              expandEventsToMaxWidth(collisionGroup);
          }
      }
docs: Calculates the left and right positions of each events. This comes handy specially if events
  are overlapping.
  @param eventRects The events along with their wrapper class.