Android Fragments.pdf
(
1661 KB
)
Pobierz
Harness the power of fragments to build pro-level Android UIs
Android
Fragments
Dave MacLean
|
Satya Komatineni
www.it-ebooks.info
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
www.it-ebooks.info
Contents at a
Glance
About the Authors�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xi
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xiii
Acknowledgments �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xv
Introduction �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xvii
■
Chapter 1: Fragments Fundamentals �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
1
■
Chapter 2: Responding to Configuration Changes �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
35
■
Chapter 3: Working with Dialogs �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
45
■
Chapter 4: Working with Preferences and Saving State�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
61
■
Chapter 5: Using the Compatibility Library for Older Devices �½�½�½�½�½�½
83
■
Chapter 6: Advanced AsyncTask and Progress Dialogs �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
91
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
115
v
www.it-ebooks.info
Introduction
Mobile application development is as hot a topic as ever. Consumers have
been benefiting from smartphones for years, and now more and more
companies are getting into the game. Some developers are learning mobile
development brand new, while others are coming from backgrounds in web
development or PC programming. No matter, making mobile applications
that work well requires learning some new concepts and skills. With Android
in particular, fragments are one of those topics that are critical to an Android
application, but are not that easy to master. Once you understand the inner
details of how fragments work, and the ways in which they can be used, you
will find it much easier to design and build Android applications.
Fragments are conceptual containers of user interface and logic that can be
easily combined as building blocks into your mobile application. Android has
not abandoned the
Activity
class, but activities are now often composed
from fragments. This makes it much easier to build applications to support
different device types, sizes and orientations.
This book,
Android Fragments,
is our sixth book on Android. In the first
four books, published under the
Pro Android
name, we covered many of
the Android APIs, from basic Views to broadcast receivers, touchscreens,
services and animations. In
Expert Android
we tackled more advanced
Android APIs as well as the advanced debugging capabilities of Android.
Android Fragments
is actually a subset of the
Pro Android
book. It focuses
specifically on fragments, providing you with the detail you won’t find
in other books. It covers not only the basic fragment, but also dialog
fragments, preference fragments, and progress dialog fragments. It covers
the compatibility library so you can use fragments with the older versions of
Android that originally did not support fragments. After reading this book,
you should have no fear incorporating all manner of fragments into your
applications.
xvii
www.it-ebooks.info
xviii
Introduction
Is This Book for You?
This book was written for the mobile developer who has a good
understanding of Android, and the basics of an Android application, but who
needs or wants an in-depth understanding of fragments. A good architect
knows the materials. To build great mobile applications, the great mobile
developer needs to know fragments. If you don’t know, or if you’re not sure
you understand fragments well, then this book is for you.
What You Need to Know Before You Begin
Android Fragments
assumes that you are familiar with Java and basic
Android and that you have developed Android applications, using Eclipse or
another IDE. You do not need to be an Android expert.
With that said, here’s a brief, quick overview of what is in
Android
Fragments,
chapter by chapter.
What’s in This Book
We start
Android Fragments
by documenting in depth the
Fragment
class
and its life cycle. We cover the careful integration dance between the
activities and the fragments of an application. You’ll see how to incorporate
fragments into the UI, but also how to encapsulate functionality into
fragments.
Chapter 2 helps you understand what happens to a fragment during a
configuration change, such as the rotation of a device. You’ll see how
fragments make this easier than it has been in the past.
Dialogs are very common in applications, and now you’ll be using fragments
to display them. Find out how in Chapter 3.
Preferences also went through some major UI changes when fragments
came along. Chapter 4 covers everything you need to know about using
Android’s preference framework for preferences or for just a quick and easy
way to store some application state from one invocation to the next.
Android fragmentation has to do with the many different versions of Android
that exist in the world at the same time. And while it is not about fragments,
you’ll want to know how to use fragments on older versions of Android that
pre-date the introduction of fragments. Google has made it possible through
the use of compatibility libraries, so Chapter 5 shows you how to use
them. After reading this chapter you’ll be able to write one application, with
fragments, and have it supported on devices as old as Froyo (Android 2.2).
www.it-ebooks.info
Plik z chomika:
szary696
Inne pliki z tego folderu:
AndEngine for Android Game Development Cookbook.pdf
(28715 KB)
Learning Pentesting for Android Devices.pdf
(14516 KB)
50 Android Hacks.pdf
(10631 KB)
Beginning Android 4 Application Development.pdf
(61960 KB)
Beginning Android Tablet Application Development.pdf
(53549 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Arduino
Arduino books
Arduino Projekty
Books
Zgłoś jeśli
naruszono regulamin