tl;dr Here’s the slides! The Fragment Transition
Photo Credit: Xavi Rigau
In a time before Honeycomb (or Gingerbread for that matter), I helped found the Android team at Comcast Interactive Media. We released our first app in the spring of 2011, right about the same time that Honeycomb was released. We immediately embraced fragments and released a tablet version of our application within the first three months. (At the time, the Motorola Xoom was the only available tablet on the market!)
I founded a meetup group and started attending Android events and conferences. I was surprised to find how few developers were using them, even a year later. There were many fears around embracing fragments, including not knowing what they were, uncertainty of supporting old and new at the same time, heroic effort required to refactor your app, and no one was sure if Android tablets would catch on anyway.
Thus this talk was born! I’ve given it a several times over the past few years (and had even retired the slides). When the organizers of DroidCon Sweden reached out, they specifically requested this talk since there are still relatively few people are using them.
The talk went smoothy and I got a lot of great questions during and after the talk. An excellent point was made about using the support library going forward, even if you are just supporting Honeycomb+. Platform engineers are better able to fix problems with Fragments and other parts of the support library that are baked into the framework (because the framework will remain unchanged or change much slower), so it’s unlikely that the support library will go out of style.
After the talk, I had some great discussions that could lead to follow up talks about fragment patterns in the wild and diving deep into the fragment callback/lifecycle.
Now, if you follow Android closely, you’ve probably heard about the recent push away from Fragments by companies like Square. While I respect their opinion, if you are a developer who hasn’t used Fragments much, you should learn the foundational topics first. Once you have a firm grasp and find that they aren’t meeting your needs, then consider charting your own path. In many cases, you could introduce more complexity by using a custom-views-for-everything approach.
Love fragments? Think custom views are the best? Join my mailing list to continue the discussion.