FAQ
When should I use Fragments?
Hopefully, you have learned enough in this chapter to realize that using Fragments further enhances reusability and encapsulation of our code, and whenever we implement anything more than just a single, simple UI, it is well worth the overhead to use Fragments.
Any other times I should use Fragments?
Further consider that even the most simple of apps can evolve. If your simple single-screen app for phones only, suddenly needs to be ported for tablets, you will need to refactor everything to use Fragments. This is always harder than using Fragments from the start.
So are you saying that I should always use Fragments?
Probably, yes! Unless you have an extremely compelling case not too. However, in this book, to learn new ideas, such as capturing an image on an Android device or displaying the users' location in Google maps, we will do so without Fragments getting in the way of the new code.