Jump to ratings and reviews
Rate this book

Creating Dynamic UI with Android Fragments

Rate this book
Make your Android apps a superior, silky-smooth experience for the end-user with this comprehensive guide to creating a dynamic and multi-pane UI. Everything you need to know in one handy volume. Overview In Detail To create a dynamic and multi-pane user interface on Android, you need to encapsulate UI components and activity behaviors into modules that you can swap into and out of your activities. You can create these modules with the fragment class, which behaves somewhat like a nested activity that can define its own layout and manage its own lifecycle. When a fragment specifies its own layout, it can be configured in different combinations with other fragments inside an activity to modify your layout configuration for different screen sizes (a small screen might show one fragment at a time, but a large screen can show two or more). Creating Dynamic UI with Android Fragments shows you how to create modern Android applications that meet the high expectations of today’s users. You will learn how to incorporate rich navigation features like swipe-based screen browsing and how to create adaptive UIs that ensure your application looks fantastic whether run on a low cost smartphone or the latest tablet. This book looks at the impact fragments have on Android UI design and their role in both simplifying many common UI challenges and providing new ways to incorporate rich UI behaviors. You will learn how to use fragments to create UIs that automatically adapt to device differences. We look closely at the roll of fragment transactions and how to work with the Android back stack. Leveraging this understanding, we then explore several specialized fragment-related classes like ListFragment and DialogFragment as well as rich navigation features like swipe-based screen browsing. What you will learn from this book Approach A fast-paced tutorial that guides you through everything you need to know about dynamic UI design for Android devices. Who this book is written for This book is for developers with a basic understanding of Android programming who would like to improve the appearance and usability of their applications. Whether you’re looking to create a more interactive user experience, create more dynamically adaptive UIs, provide better support for tablets and smartphones in a single app, reduce the complexity of managing your app UIs, or you are just trying to expand your UI design philosophy, then this book is for you.

122 pages, Paperback

Published September 25, 2013

2 people are currently reading
24 people want to read

About the author

Jim Wilson

257 books15 followers
Jim Wilson could have simply dismissed himself as a competent piano tuner-technician, even an exceptional one. But he was and is so much more, and it took the sudden death of a dear friend and the encouragement of a legendary singer/songwriter to prove it to him.

From a broken home in Amarillo, Texas to a multi-award-winning recording artist, Jim Wilson’s journey is a captivating tale of showbiz glamour, personal tragedy, self-discovery, and dogged determination. And, as is typical of Jim Wilson, he’s turned out to be a pretty good wordsmith.

Tuned-In: Memoirs of a Piano Man is a page-turner and a life-changer. It’s a self-help book in the form of an autobiography. It is entertaining, revealing and full of lessons for musicians, fans, and all readers.

Jim Wilson’s life direction was set when he was given a guitar at age 7, then began composing songs at age 9. Soon after moving from West Texas to LA in his early 20’s, he gained a reputation as a respected piano technician, catering to the highest echelon of the music industry. Jim helped develop the first MIDI-adapter for acoustic piano in the 80’s, which became an instant hit with artists and studios around the world.

It was the shocking, untimely death of his closest friend that forced Jim to question the whole purpose of his life. With the love and support of his musical heroes – most significantly his friend and mentor, Dan Fogelberg -- Jim set out on a solo career, composing, recording and performing his signature style of piano-featured instrumentals.

Four of Jim’s ten recordings have hit the Billboard Top-20, he’s had two PBS specials, and his music has been streamed over 75 million times by fans around the globe. He was recently made a “Lifetime Member” of the Recording Academy. He enjoys scuba diving, skiing, pilot lessons, and mountain biking. Tuned In is Jim’s first book.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
5 (31%)
4 stars
9 (56%)
3 stars
2 (12%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 7 of 7 reviews
2 reviews
November 29, 2013
The concept of Fragments was introduced in Android Honeycomb. Although this feels like a very long time, it was in fact only 2 years ago. This new book attempts to summarise some of the last 2 years and what we (should) have learned.

The book starts with an overview of when to use fragments (and also when not to) and introduces them using an example that we follow throughout the book. The example changes from a simple app into a more advanced one with landscape views, which is later migrated to tablets. This way it changes from a normal layout application into one with fragments.
It not only explains resource folders, but also layout aliases mechanism. This is a great start for new developers.

If you are already familiar with fragments you might want to skip the first part but should pay attention to the the part about lifecycle. It details exactly how lifecycle and associated methods of activities and fragment are bound. The book describes the important differences between onCreate() and onCreateView() especially when it comes to pausing views and what it means in terms of performance for the developer.

The last part of the book covers actionbar navigation examples built with fragments as tabs or dropdown navigation. For me, this is the only negative point in the book — nowadays most people use menu drawer for navigation, but this is completly missing in the book. It would have been great to see this compared to other modes and what you need to change in your app and how it effects your fragments.

Altogether this is an important book. It's not a large book, just a few hundred pages, so a quick read and a quick win.
9 reviews1 follower
December 9, 2013
The book by Jim Wilson is very clear and exhaustive about a powerfull technique of the most modern UI design approach for Android applications. The intention is really clear: to describe with a very detailed level the pros and cons of fragments approach, in contrast with activity based one. In addition to that, Jim explains all the fragments related stuff to create very effective Android UI...

Divided in three parts, the first one is a simple but efficient comparison between the traditional way of programming UI for Android and the new one (introduced in Android Honeycomb, 3.0 version, when tablets starts to came out). The middle part covers the lifecycle of fragments inside the Android application (I really appreciate this one!), about two aspects: in the creation, setup, destruction and management of fragments inside the Android application and in the fragment transactions in the UI, in order to create rich UI navigation. In the end, the third part improves the ActionBar design and workflow.

The required level to approach this book is more or less low: basic knowledge of Android programming and a working development environment for the examples.

In summary, I found this book really helpful to introduce and make you a master in Android Fragment design and code writing.

Note: This book was provided for review by Packt.
13 reviews
December 19, 2013
Over the past few months I have been trying to expand my knowledge of Android development and this was a great supplement on the subject of Fragments.

The in depth coverage of the topics were of a very high standard as I have come to expect of most Packt Publications.

This is a must read for any serious Android developer
Profile Image for Daryl Ducharme.
30 reviews4 followers
February 7, 2017
A great primer on fragments

I got dumped into the deep end on Android development. My first professional Android project was a monolithic beast of an app that takes full advantage of fragments. However, following what was going on and figuring out best practices was hard to do from such a large code base. This book got me up to speed quickly and easily.
Profile Image for Igor.
31 reviews1 follower
September 24, 2016
Good book, clearly written, concise and with enough examples that everything can be understood easily. I've read 2nd edition
Displaying 1 - 7 of 7 reviews

Can't find what you're looking for?

Get help and learn more about the design.