Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exceptions causing render to fail in the layout editor. #967

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sampengilly
Copy link

My attempt at fixing #876

The main cause with calendarMode not being set was that an exception was occurring inside the state setup in the constructor, this exception was being swallowed by the try-catch block surrounding the setup logic.

The exception that was occurring in the state setup was the ThreeTen missing zone data one. By calling AndroidThreeTen.init(context) for edit mode at the beginning of the constructor this exception can be prevented.

Another exception that was occurring was due to a null previousMonth in the TitleChanger.

While this PR results in the calendar displaying in the layout editor, the dates displayed aren't a complete representation of the month, and the calendar mode isn't properly honoured.

The main cause with calendarMode not being set was that an exception was occurring inside the state setup in the constructor, this exception was being swallowed by the try-catch block surrounding the setup logic.

The exception that was occurring in the state setup was the ThreeTen missing zone data one. By calling `AndroidThreeTen.init(context)` for edit mode at the beginning of the constructor this exception can be prevented.

Another exception that was occurring was due to a null `previousMonth` in the `TitleChanger`.

While this PR results in the calendar displaying in the layout editor, the dates displayed aren't a complete representation of the month, and the calendar mode isn't properly honoured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants