Closed entropitor closed 8 years ago
Doesn't sound like it's easily reproducable, but would be good to know what causes this lineCount. Do you have any additional infos about the params for static layout? e.g. an odd availableWidth or an empty bob?
We could catch this exception an log these params for debug builds for additional infos. Or simply check getLineCount for zero and skip drawing.
Nope, we don't have any info yet. But when I read the stackoverflow, it seems like it's rather a synchronisation issue than a specific string that is causing the problem. Not drawing is a possible solution, but I'm not sure if it will draw anything then after a while.
@lolobosse @alamkanak you guys any idea?
Only occurs on Samsung SM-G800F so probably bug in their code.
I sometimes get a division by zero error at https://github.com/alamkanak/Android-Week-View/blob/develop/library/src/main/java/com/alamkanak/weekview/WeekView.java#L895
java.lang.ArithmeticException: divide by zero at com.alamkanak.weekview.WeekView.a(WeekView.java:895)
@alamkanak @marunjar Any ideas on how to solve this? (It seems similair to https://stackoverflow.com/questions/5084647/staticlayout-getellipsiscount-returning-0-when-i-know-its-ellipsizing)