question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The content height of weekview affects other weekview

See original GitHub issue

I develop the following screen.

スクリーンショット 2019-06-13 1 31 20

Each xml defines weekview, and activity shows custom view(status message view). As you can see, when back to fragment from activity, the height of weekview will shrink by the height of custom view. It looks like a content height, not the height of the view itself.

スクリーンショット 2019-06-13 1 55 29

After scrolling down, tapping on space crashes.

Process: com.sample.weekview, PID: 6794
    org.threeten.bp.DateTimeException: Invalid value for HourOfDay (valid values 0 - 23): 24
        at org.threeten.bp.temporal.ValueRange.checkValidValue(ValueRange.java:278)
        at org.threeten.bp.temporal.ChronoField.checkValidValue(ChronoField.java:557)
        at org.threeten.bp.LocalTime.withHour(LocalTime.java:833)
        at org.threeten.bp.LocalDateTime.withHour(LocalDateTime.java:927)
        at org.threeten.bp.ZonedDateTime.withHour(ZonedDateTime.java:1309)
        at com.alamkanak.weekview.WeekViewTouchHandler.getTimeFromPoint(WeekViewTouchHandler.kt:50)
        at com.alamkanak.weekview.WeekViewGestureHandler.onSingleTapConfirmed(WeekViewGestureHandler.java:253)
        at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:300)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:241)
        at android.app.ActivityThread.main(ActivityThread.java:6217)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

weekview in xml

<com.alamkanak.weekview.WeekView
        android:id="@+id/weekView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:columnGap="1dp"
        app:eventCornerRadius="4dp"
        app:eventPadding="4dp"
        app:eventTextColor="@color/white"
        app:headerRowBottomLineColor="@color/mainGray"
        app:headerRowBottomLineWidth="1dp"
        app:headerRowPadding="12dp"
        app:hourHeight="60dp"
        app:nowLineColor="@color/mainPurple"
        app:nowLineDotColor="@color/mainPurple"
        app:nowLineDotRadius="5dp"
        app:nowLineStrokeWidth="1dp"
        app:numberOfVisibleDays="3"
        app:overlappingEventGap="1dp"
        app:showCurrentTimeFirst="true"
        app:showHeaderRowBottomLine="true"
        app:showNowLine="true"
        app:showNowLineDot="true"
        app:showTimeColumnSeparator="true"
        app:singleDayHorizontalMargin="8dp"
        app:singleLineHeader="false"
        app:timeColumnBackgroundColor="@color/white"
        app:timeColumnPadding="8dp"
        app:timeColumnSeparatorColor="@color/mainGray"
        app:timeColumnSeparatorStrokeWidth="1dp"
        app:timeColumnTextColor="@color/mainBlack"
        app:timeColumnTextSize="12sp"
        app:todayHeaderTextColor="@color/mainGreen"
        app:todayBackgroundColor="@color/todayBackground"
        app:maxHourHeight="60dp"
        app:minHourHeight="60dp"
        />

Do you know the cause? Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tdc-wcommented, Jul 16, 2019

As I use fragment, it seems to be improved by removing and adding fragment. I think that there is no problem as a temporary workaround. Thanks.

1reaction
thellmundcommented, Jun 16, 2019

I believe that 86009e4acc7685dc896010d477821c3dc57f5f8a fixes your issue. If you’re brave enough, you can try it out on the current develop snapshot – there are some breaking changes when upgrading from v3.4.2, though.

I’ll close this issue now. If you continue to experience issues, feel free to re-open it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery fullcalendar: Unable to set height for agendaWeek or ...
The fact is that the documentation shows about height or contentHeight option, but this has no impact on the calculated height in agendaWeek...
Read more >
Week view height issues on Chrome and Firefox #35 - GitHub
Greetings. I am trying to use BigCalendar with no toolbar and with absolute positioning to fill part of a flexbox layout page.
Read more >
Change how you view events in Calendar on iPhone
View a weekly calendar: In Day view, rotate iPhone sideways. View a list of events: In Month view, tap the List button to...
Read more >
Outlook Week view has 3" height to the hours
Before it was an inch high or less, now it is 3" high. There is little content and scrolling is required. The down...
Read more >
In scheduler, day or week view, how to reduce the hour height in ...
It's correct behavior (even if it's a little bit confusing). It occurs because the background is set by the image, and the config...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found