--

Ooof, wow :facepalm: are you right. It's a shame the linter doesn't show the error when the FragmentObserver is in a separate file. It could have saved me from myself.

I guess in my desire for a simple API I missed the obvious staring me in the face. You are absolutely right that the FragmentObserver isn't necessary. In fact, it's likely desirable to be explicit about which lifecycle we care about observing on.

Thanks for the reply. I'm going to adjust the article accordingly.

--

--

Michael Ferguson
Michael Ferguson

Written by Michael Ferguson

Android software developer. Views and opinions expressed are my own and not that of my employer.

No responses yet