- Home
- » Catalog Home
- » Head first Android development: a brain-friendly guide
Head first Android development: a brain-friendly guide
Author
Language
English
Description
Loading Description...
Table of Contents
From the Online Content - First edition.
Title page; Copyright; Table of Contents; Intro: How to use this book; Who is this book for?; We know what you're thinking; Metacognition: thinking about thinking; Read me; The technical review team; Acknowledgments; Safari Books Online; Chapter 1: Diving In; Welcome to Androidville; The Android platform dissected; Here's what we're going to do; Your development environment; Install Java; There are no dumb questions; Let's build a basic app; You've just created your first Android app; Useful files in your project; Edit code with the Android Studio editors; Run the app in the Android emulator
Creating an Android Virtual DeviceTest drive; Refining the app; What's in the layout?; Take the app for a test drive; Your Android Toolbox; Chapter 2: Building Interactive Apps; You're going to build a Beer Adviser app; Create the project; We've created a default activity and layout; Adding components with the design editor; A closer look at the layout code; Change the layout to use the string resources; Let's take the app for a test drive; Make the button call a method; Add an onClickFindBeer() method to the activity; Update the activity code; The first version of the activity
What the code doesTest drive the changes; Building the custom Java class; Activity code version 2; Test drive your app; Your Android Toolbox; Chapter 3: Multiple Activities and Intents; Apps can contain more than one activity; Here's the app structure; Update the layout; Create the second activity and layout; Welcome to the Android manifest file; Use an intent to start the second activity; What happens when you run the app; Update the text view properties; Update the CreateMessageActivity code; Test drive the app; How Android apps work; Change the intent to use an action
The intent filter tells Android which activities can handle which actionsHow Android uses the intent filter; Your Android Toolbox; Chapter 4: The Activity Lifecycle; How do activities really work?; The Stopwatch app; The stopwatch layout code; How the activity code will work; Add code for the buttons; The runTimer() method; Handlers allow you to schedule code; The full StopwatchActivity code; What happens when you run the app; Test drive the app; Rotating the screen changes the device configuration; From birth to death: the states of an activity; The activity lifecycle: from create to destroy
Your activity inherits the lifecycle methodsHow do we deal with configuration changes?; What happens when you run the app; Test drive the app; The activity lifecycle: the visible lifetime; We need to implement two more lifecycle methods; The updated StopwatchActivity code; What happens when you run the app; Test drive the app; The activity lifecycle: the foreground lifetime; Stop the stopwatch if the activity's paused; What happens when you run the app; Test drive the app; The complete activity code; Your handy guide to the lifecycle methods; Your Android Toolbox
Excerpt
Loading Excerpt...
Author Notes
Loading Author Notes...
More Details
Contributors
ISBN
9781449362140
9781449362164
9781449362164