Friday, 2 March 2012
Android Activities, Fragments, Loaders, Tasks and Back stack made easy
Activities are at the heart of any Android application. They provide the screen which the user sees and interacts with. Any budding Android developer would need to understand activities before writing their first application. This eBook is a great place to start.
Android Activities, Fragments, Loaders, Tasks and Back stack made easy is an attempt to simplify the official Android documentation on these topics. It is divided into two parts, Part A covers the theory and Part B is where everything comes together in eight easy-to-follow tutorials. Each tutorial is discussed line-by-line which makes it very easy to understand.
The theory covers Activities in detail, including the life-cycle of the activity and saving activity state. Fragments, introduced with �Honeycomb�, are also covered in detail as are Loaders (introduced with Android version 3.0), Tasks and the Back stack.
Part B has tutorials for each of the sections covered in Part A. We start with 5 Activity tutorials
- creating a simple activity
- switching between two activities
- starting an activity for results
- showing the life-cycle of the activity
- saving an activity's state
Then there are the two Fragment tutorials, the first shows how to use fragments with Android Honeycomb and the second shows how to use fragments with the compatibility pack - which allows you to use fragments with Android version 1.6 and up.
Finally there is the Loader tutorial which also uses fragments and shows how to use a loader to retrieve data from a database. Again, we use the compatibility pack which not only allows you to use Fragments from Android version 1.6 and up but also Loaders.
Once you have completed these tutorials, you will have a solid understanding on how to develop Android applications. You will understand the important concepts of the Activity life-cycle, saving Activity state, tasks and the Back stack.
You will also know how to use Fragments for tablet applications as well as older versions of Android down to version 1.6.
You will also have a solid understanding of Loaders and how to use them in retrieving data from a data source.
All in all you will have a solid grounding to work from as you increase your Android development skills.
This eBook assumes that you have at least completed the �Hello world� tutorial which can be found on the official Android website. All the tutorials have been written with Eclipse (Helios) as the development environment. Naturally you can use any other development environment.
All tutorial project files are available for download.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment