I actually did try using retained headless fragments back in 2014 and then re-discovered them when square/flow used it in 2016, and I actually still use it as library internals to this day lmao
Or just refetch everything on config changes, what can go wrong? If you really care about #perfmatters, just lock to portait - boom, no more config changes. Only nerds use loaders or headless fragments.
24
u/PaulTR88 Probably deprecated Apr 02 '26
Fragments? Whipper snapper, back in my day we only had activities and ant and eclipse
27
u/Mr-X89 Apr 02 '26
I... Don't actually. We just serialized the state and restored it, like Wharton intended
11
u/thecosmicfrog Apr 02 '26
Headless fragments? I just built a thin XML wrapper around AsyncTask to achieve the same goal.
7
u/Mammoth-Law-1291 Apr 03 '26
Fragments?? When I started, there were only activities.
7
u/budius333 Still using AsyncTask Apr 03 '26
Fragments???
Back in my day I had an activity with 2000 lines of code and would save my AsyncTask on
retainNonConfigurationInstance(or whatever it was called6
u/Shay958 DI? you mean InheritedWidget? Apr 03 '26
I remember Butter Knife and serialization of state and saving (or something like that). Simpler times...
5
u/turelimLegacy Apr 03 '26
Or just refetch everything on config changes, what can go wrong? If you really care about #perfmatters, just lock to portait - boom, no more config changes. Only nerds use loaders or headless fragments.
2
u/Bleizwerg Apr 04 '26
We got so much more fancy stuff, but the outcome is more or less the same...