Book Image

Creating Dynamic UI with Android Fragments

By : Jim Wilson
Book Image

Creating Dynamic UI with Android Fragments

By: Jim Wilson

Overview of this book

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.
Table of Contents (13 chapters)

About the Reviewers

Robert Dale Johnson III is a Software Engineer who specializes in Android, Joomla, and BD-J (BluRay Disc – Java) development. He graduated in 2008 from California State University Northridge with a BS in Computer Science. He started his career working with BD-J for Deluxe Digital Studios (DDS), Panasonic, and Deluxe Digital Distribution (D3), where he worked on movie titles such as Avatar, Oceans, Spinal Tap, and Conquest of the Planet of the Apes along with many other titles and web-enabled BluRay features. During his time at D3, Robert made the transition from BD-J to Android development where he was a principal developer on the StarzPlay, EncorePlay, and MovieplexPlay apps. He also worked on the NookVideo app developed for non-Nook devices. During his time with D3 Robert moved to Nashville, TN and eventually found Aloompa LLC where he found a home as a Senior Android Developer developing applications for festivals throughout the country such as Coachella, Stagecoach, Governsball, Bannaroo, and many more.

Along with his fulltime professional pursuits, Robert is a seasoned freelancer with many projects in his repertoire (see his personal website www.rdjiii.info) and has started a software consulting company, Contrahere Solutions LLC (see www.contrahere.com). You can reach Robert by going to one of the websites previously mentioned or by e-mail anytime at . Robert is also an avid racquetball player who travels across the country playing in tournaments as a Team Ektelon player. He is a motorcycle enthusiast and loves to dabble in tech such as Arduino and RaspberryPi in his spare time.

Alex Lockwood is an experienced developer/consultant in the Android community, and an active user on StackOverflow. His blog can be found at http://www.androiddesignpatterns.com.