When duration is below 15, the event is pushed to bottom of timeline regardless of start time
Step to produce:
- add following line to inital events: new Event("Lunch", "Cafeteria", 13, 30, 3, android.R.color.holo_green_dark),
- build and run
Haha, I just submitted this same bug without realizing it's a duplicate: https://github.com/linkedin/Tachyon/issues/12
I believe I traced down the code that causes the issue, so hopefully, that's still valuable, even if it is a duplicated report
seems like the author did it intentionally (not sure why though), i ended up subclass the calendar view and default MIN_DURATION_MINUTES=1 and it worked
@duonglong,
I'd be interested to get your opinion on my proposed bug fix. I think the intention of this part of the code is to prevent tiny Events that appear as unreadable slivers in the DayView.
Overriding the MIN_DURATION_MINUTES would fix the bug of drawing the Event in the wrong part of the DayView. But it also guarantees that Event duration can never be less than MIN_DURATION_MINUTES, which short-circuits the logic entirely. IMHO, if you're concerned about the original author's intent, that's probably not the right approach.
I'm not sure if/when my bug fix will be merged, but if you agree with my fix (or just want to test it), you can include my change by importing my forked repo via jitpack.