Comments (3)
@nbeuret I'm sorry for the late reply, seems I forgot to. Can you add an event to the example class from 17 tot 00 ? And check if that event is shown ? If you push it to a fork, I can also test it and debug.
from android-week-view.
Can confirm this bug. Any event that ends at 00:00 is not shown.
EDIT: I've figured out what's causing this issue:
Inside the expandEventsToMaxWidth(List<EventRect> collisionGroup)
method in the WeekView class, at line 1414 this statement is the root cause:
eventRect.bottom = getPassedMinutesInDay(eventRect.event.getEndTime());
For events where the endTime is midnight of the next day, the getPassedMinutesInDay()
method will return 0.
Later on, when the library tries to render the rectangle for the event in the drawEvents(Calendar date, float startFromPixel, Canvas canvas)
method, the following statement, bottom = mHourHeight * bottom / 60 + mCurrentOrigin.y + mHeaderHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom + mTimeTextHeight/2 - mEventMarginVertical - marginTop;
at line 1039 will produce a negative float because bottom is 0.
Finally, the If statement at line 1050 if (left < right && left < getWidth() && top < getHeight() && right > mHeaderColumnWidth && bottom > mHeaderHeight + mHeaderRowPadding * 2 + mTimeTextHeight / 2 + mHeaderMarginBottom)
that determines whether or not the EventRect has valid coordinates will fail and result in the event's rectangle getting set to null
.
from android-week-view.
@jhoobergs Any chance you could take a look at my pull-request that fixes this issue any time soon?
from android-week-view.
Related Issues (20)
- Bug with goToHour method when time range is set HOT 3
- Serious bug in viewing events : not showing all events that are given HOT 1
- Bug: adding full day WeekViewEvent with same startDate and endDate results in single cell HOT 1
- Event not drawing on 31st day of month HOT 2
- Events Not loading after asynchronous call
- On Load scroll to current time, not 12am HOT 1
- disable fling doesn't seem to work correctly HOT 1
- Crash issue
- Enchanced : customize the date format
- Preview Render Problems HOT 1
- Add Event Dynamically HOT 3
- Crashes on API 28
- doesnt shows anything any help HOT 1
- Needs to Click the gototoday before showing all the events
- How to implement a multi-line String on header date
- Drag and Drop feature on marked Events HOT 3
- 动态添加event 一直返回
- Event title vertical alignment
- Multiple events on same day not showing
- is it possible to turn off zoom?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-week-view.