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: views might be null during onLayout. #13

Closed
wants to merge 1 commit into from

Conversation

parkin
Copy link
Contributor

@parkin parkin commented Jan 22, 2014

added flag set to true during onLayout. The flag is used so we don't try to calculate dimensions of a view that might become null during layout (say if we are removing views).

I was getting this error when I removed views from the ScrollView's child and the get_ForViewRelativeOnlyChild methods were being called. During onLayout, the views that get_ForViewRelativeOnlyChild is trying to calculate the dimensions of might become null. So we should just return zero from get*ForViewRelativeOnlyChild during this time, as the info is likely garbage anyway.

…try to calculate dimensions of a view that might become null during layout (say if we are removing views)
@parkin parkin closed this Jan 22, 2014
@parkin
Copy link
Contributor Author

parkin commented Jan 22, 2014

This is still a problem

@emilsjolander
Copy link
Owner

Is this still a bug or not? I'm wondering because you didn't reopen the issue

@parkin
Copy link
Contributor Author

parkin commented Jan 28, 2014

It is still a bug, see #14.

I thought this pull request had fixed the bug, but the bug persisted, so I want to forget about this pull request. Sorry about that!

@parkin parkin deleted the onLayoutViewNullFix branch January 28, 2014 03:47
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