Quivr / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
258 stars 64 forks source link

Serious bug in viewing events : not showing all events that are given #105

Closed AndroidDeveloperLB closed 6 years ago

AndroidDeveloperLB commented 6 years ago

Suppose I take the AsynchronousActivity sample, and instead of using what the server provides, I just put fake events of 60 days before today:

@Override
public void success(List<Event> events, Response response) {
    this.events.clear();
    if (!events.isEmpty())
        for (int i = 0; i < 60; ++i) {
            Calendar cal = Calendar.getInstance();
            cal.add(Calendar.DAY_OF_MONTH, -i);
            Calendar cal2 = (Calendar) cal.clone();
            cal2.add(Calendar.MINUTE, 1);
            WeekViewEvent event = new WeekViewEvent(Integer.toString(i), "event:" + Integer.toString(i), null, cal, cal2, true);
            event.setColor(0xffff0000);
            this.events.add(event);
        }
    //for (Event event : events) {
    //    this.events.add(event.toWeekViewEvent());
    //}
    getWeekView().notifyDatasetChanged();
}

This should show events from 0 (today) to 59 (including).

However, it shows only some of the events, as you scroll :

device-2018-05-27-122114.zip

AndroidDeveloperLB commented 6 years ago

OK fixed here: https://github.com/Quivr/Android-Week-View/pull/97/commits/8ebc6465b47e4b53153d1cdc59d374a351c0a1ad