You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the general usage is to use onViewCreated, however the only reason why it's unavailable in onCreate is that internally, the Backstack is maintained by a platform retained fragment.
Although on second thought, as Fragment.onCreate is executed by Activity's super.onCreate after process death, it wouldn't have a state changer, so calling lookupService on it then would have also failed anyway.
Still, this means that Fragment.onCreate is kind of a liability. Not sure what can be done about this other than saying "use onViewCreated instead" or do a handler.post. Most likely just documentation issue, as this is fragment design (I don't think we need to recreate services until the state changer is set).
The text was updated successfully, but these errors were encountered:
Currently, the general usage is to use onViewCreated, however the only reason why it's unavailable in onCreate is that internally, the Backstack is maintained by a platform retained fragment.
Although on second thought, as Fragment.onCreate is executed by Activity's super.onCreate after process death, it wouldn't have a state changer, so calling lookupService on it then would have also failed anyway.
Still, this means that Fragment.onCreate is kind of a liability. Not sure what can be done about this other than saying "use onViewCreated instead" or do a handler.post. Most likely just documentation issue, as this is fragment design (I don't think we need to recreate services until the state changer is set).
The text was updated successfully, but these errors were encountered: