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

Add Fragment.onViewCreated as a known initializer. #279

Merged
merged 1 commit into from Feb 12, 2019

Conversation

lazaroclapp
Copy link
Collaborator

From the documentation:

"Called immediately after onCreateView(LayoutInflater, ViewGroup, Bundle) has returned, but before any saved state has been restored in to the view."

So, if one is an initializer, the other should be as well.

@lazaroclapp
Copy link
Collaborator Author

We currently don't have any support for forcing an order between initializers. Not sure if that will end up mattering :)

@msridhar
Copy link
Collaborator

We currently don't have any support for forcing an order between initializers. Not sure if that will end up mattering :)

It could matter for checking for use-before-init bugs, if the later-running initializer reads a field that was assigned in the earlier-running initializer. Right now I believe this case will lead to a false positive warning. So if it matters we should see it 😄

@lazaroclapp lazaroclapp merged commit bab710c into master Feb 12, 2019
@lazaroclapp lazaroclapp deleted the lazaro_add_onViewCreated_known_initializer branch February 12, 2019 04:41
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