4 ms·
Don't nest fragments. Just don't. Fragments are half baked. Nested fragments are half (quarter?) baked. In most cased the inner fragment could be made into a c
by krschultz 12y ago
Don't nest fragments. Just don't. Fragments are half baked. Nested fragments are half (quarter?) baked.
In most cased the inner fragment could be made into a custom View, and those work a lot better. Most new Android developer do not make enough custom views. They are the fundamental unit of UI re-use. It's relatively simple to extends FrameLayout or RelativeLayout, encapsulate a view normal views, layer your logic on top, and you have a nice usable component.
- bicx 12y agoAs an experienced Android dev, I cannot agree more. I have never had a particularly fun experience with fragments, although they definitely have their place. Custom views though... I love them more every day.