thellmund / Android-Week-View

Display highly customizable calendar views in your Android app
Apache License 2.0
188 stars 97 forks source link

WeekView show only 1 event in day #90

Closed kingvhit closed 5 years ago

kingvhit commented 5 years ago

Describe the bug I'm facing a new issue that I already mention on #89, that the event list just shows 1 event per day. I'm currently reproducing on the sample app. Please check it.

To Reproduce Steps to reproduce the behavior:

  1. Add the new data of events.json with the current day. Right now is 24 Jul 2019, so I added 2 events
    {
        "name": "Event 129",
        "dayOfMonth": 24,
        "startTime": "18:00",
        "endTime": "19:00",
        "color": "#F57F68"
    },
    {
        "name": "Event 1299",
        "dayOfMonth": 24,
        "startTime": "20:30",
        "endTime": "21:00",
        "color": "#F57F68"
    },
  2. Go to AsyncActivity
  3. View a list event of per days, It will show only 1 event although it has multiple events.

It shows up only Event 1299. This issue only occurs when using notifydatasetchanged() after data loading async I think because I can't reproduce on another screen.

More info: This issue is facing after you push new code at #89, Please take a look. Thanks.

Screenshots device-2019-07-24-003638

thellmund commented 5 years ago

The issue in the sample app was somehow unrelated: I’m using an event’s ID to check whether its EventChip is already cached and needs to be replaced. Since all events loaded from events.json weren’t assigned an ID (and thus had the default ID 0), it would only show one event per day. After committing eca87e0df78e153928b0af90d3d86ecf6d5b87ea, all events in a day are shown.

kingvhit commented 5 years ago

Thank to your more detail. I have some duplicate id and they do not show Events list. Right now, It's ok. Please close this issue. Thanks