4 ms·
Some historical context, fragments came out with Honeycomb which was the first version of Android specifically for tablets. As such Fragments were meant to be a
by yincrash 10y ago
Some historical context, fragments came out with Honeycomb which was the first version of Android specifically for tablets. As such Fragments were meant to be a way write UI in something both tablet and phone layouts could use. So, that's the mysterious reason for the extra layer of complexity. I think at this point, many people don't even use them unless they specifically need to for tablet/phone/tv shared layouts. There are also other alternative patterns that have emerged that are less complicated
- digi_owl 10y agoAlso, they envisioned tablets to be used mostly in landscape. That's why we got everything on a single bar at the bottom. The basic concept behind Fragments was pretty much the same as WebOS' Enyo framework. I recall one of the big Enyo demo moments was when a browser window was resized, and the email app ui went from multiple columns to a single column, and back, without missing a beat. Then again i wonder if Android was partially designed, before Fragments, to rekindle the experience of using Apple's Newton tablet. This in that one app would extend the functionality of another app in a virtually seamless manner via intents. But as best i can tell, Android left too much of the plumbing in the hands of the app devs. Thus for every app that handled cross-app intents properly, you got 100+ that would jump back through the in-app activity history rather than roll back the intent chain. And with fragments you got a in-app way to do the activity history backtracking, while still having the intent focused back button of the Android UI.
- dimillian 10y agoI use Fragments as "Content View Controller", phone / tablet whatever, it's just a reusable piece of UI / Logic for me.
- HNSucksAss 10y agoThe failure to envision future devices of unpredictable resolution was an insufferable failure of both Google and Apple. It's worse in Google's case because Android is more recent. I've been an iOS developer; but with Apple's continuing war on usefulness (the headphone jack being the last straw), I'm thinking of moving to Android. But everything I read and observe in the marketplace indicates that Android is a pathetically designed pile of shit.