Hacker News new | ask | show | jobs
by krschultz 4205 days 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.

1 comments

As 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.