Head First Android Development A Brain Friendly Guide 2nd Edition by Dawn Griffiths,David Griffiths- Ebook PDF Instant Download/Delivery:9781491974056,1491974052
Full download Head First Android Development A Brain Friendly Guide 2nd Edition after payment
Product details:
ISBN 10:1491974052
ISBN 13:9781491974056
Author:Dawn Griffiths,David Griffiths
What will you learn from this book?
If you have an idea for a killer Android app, this fully revised and updated edition will help you build your first working application in a jiffy. Youâ??ll learn hands-on how to structure your app, design flexible and interactive interfaces, run services in the background, make your app work on various smartphones and tablets, and much more. Itâ??s like having an experienced Android developer sitting right next to you! All you need to get started is some Java know-how.
Why does this book look so different?
Based on the latest research in cognitive science and learning theory, Head First Android Development uses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.
Head First Android Development A Brain Friendly Guide 2nd Table of contents:
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 Device
Test 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 does
Test 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 actions
How 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 methods
How 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
Chapter 5: The User Interface
Your user interface is made up of layouts and GUI components
Three key layouts: relative, linear, and grid
RelativeLayout displays views in relative positions
Adding padding
Positioning views relative to the parent layout
Attributes for positioning views relative to the parent layout
Positioning views relative to other views
Use margins to add distance between views
RelativeLayout: a summary
LinearLayout displays views in a single row or column
Let’s change up a basic linear layout
Here’s a starting point for the linear layout
Make a view streeeeetch by adding weight
Adding weight to one view
Adding weight to multiple views
Use gravity to specify where text appears in a view
The full linear layout code
LinearLayout: a summary
GridLayout displays views in a grid
Adding views to the grid layout
Let’s create a new grid layout
Row 0: add views to specific rows and columns
Row 1: make a view span multiple columns
Row 2: make a view span multiple columns
The full code for the grid layout
GridLayout: a summary
GUI components are a type of View
What being a view buys you
A layout is really a hierarchy of Views
Playing with views
Images: the layout XML
Adding images to buttons
Scroll views
Your Android Toolbox
Chapter 6: List Views and Adapters
Every app starts with ideas
Categorize your ideas: top-level, category, and detail/edits activities
Navigating through the activities
Use ListViews to navigate to data
We’re going to build part of the Starbuzz app
The drink detail activity
The Starbuzz app structure
The Drink class
The image files
Use a list view to display the list of options
The full top-level layout code
Get ListViews to respond to clicks with a Listener
Set the listener to the list view
The full TopLevelActivity code
A category activity displays the data for a single category
A ListActivity is an activity that contains only a list
How to create a list activity
Connect list views to arrays with an array adapter
Add the array adapter to DrinkCategoryActivity
What happens when you run the code
Test drive the app
How we handled clicks in TopLevelActivity
Pass data to an activity using the ListActivity onListItemClick() method
The full DrinkCategoryActivity code
A detail activity displays data for a single record
Retrieve data from the intent
Update the views with the data
The DrinkActivity code
What happens when you run the app
Test drive the app
Your Android Toolbox
Chapter 7: Fragments
Your app needs to look great on all devices
Your app may need to behave differently too
Fragments allow you to reuse code
The Workout app structure
The Workout class
How to add a fragment to your project
Fragment layout code looks just like activity layout code
What fragment code looks like
Adding a fragment to an activity’s layout
Passing the workout ID to the fragment
Get the activity to set the workout ID
Activity states revisited
The fragment lifecycle
Your fragment inherits the lifecycle methods
Set the view’s values in the fragment’s onStart() method
Test drive the app
We need to create a fragment with a list
A ListFragment is a fragment that contains only a list
How to create a list fragment
The updated WorkoutListFragment code
Display WorkoutListFragment in the MainActivity layout
Test drive the app
Wiring up the list to the detail
We need to decouple the fragment with an interface
First, add the interface to the list fragment
Then make the activity implement the interface
You want fragments to work with the back button
Don’t update—instead, replace
Using fragment transactions
The updated MainActivity code
Test drive the app
Rotating the device breaks the app
The WorkoutDetailFragment code
Phone versus tablet
The phone and tablet app structures
Put screen-specific resources in screen-specific folders
The different folder options
Tablets use layouts in the layout-large folder
The MainActivity phone layout
Phones will use DetailActivity to display details of the workout
The full DetailActivity code
Use layout differences to tell which layout the device is using
The revised MainActivity code
Test drive the app
Your Android Toolbox
Chapter 8: Nested Fragments
Creating nested fragments
The StopwatchFragment code
The StopwatchFragment layout
Add a FrameLayout where the fragment should appear
Nested fragments need nested transactions
The full WorkoutDetailFragment code
Test drive the app
Let’s look at the StopwatchFragment layout code
Make the fragment implement OnClickListener
The StopwatchFragment code
Test drive the app
The WorkoutDetailFragment code
Test drive the app
Your Android Toolbox
Chapter 9: Action Bars
Great apps have a clear structure
Different types of navigation
The Android support libraries
Your project may include support libraries
Apply a theme in AndroidManifest.xml
Define styles in style resource files
Set the default theme in styles.xml
What happens when you run the app
Adding action items to the action bar
The menu resource file
The menu showAsAction attribute
Add a new action item
Inflate the menu in the activity with the onCreateOptionsMenu() method
React to action item clicks with the onOptionsItemSelected() method
Create OrderActivity
Start OrderActivity with the Create Order action item
The full MainActivity.java code
Test drive the app
Specify the content with an intent
The full MainActivity.java code
Test drive the app
Your Android Toolbox
Chapter 10: Navigation Drawers
The Pizza app revisited
Navigation drawers deconstructed
The Pizza app structure
Create TopFragment
Create PizzaFragment
Create PastaFragment
Create StoresFragment
Add the DrawerLayout
The full code for activity_main.xml
The selectItem() method so far
Changing the action bar title
Closing the navigation drawer
The updated MainActivity.java code
Using an ActionBarDrawerToggle
Modifying action bar items at runtime
The updated MainActivity.java code
Test drive the app
Dealing with configuration changes
Adding tags to fragments
Find the fragment using its tag
The full MainActivity.java code
Test drive the app
Your Android Toolbox
Chapter 11: SQLite Databases
Back to Starbuzz
Android comes with SQLite classes
The current Starbuzz app structure
The SQLite helper manages your database
Create the SQLite helper
The StarbuzzDatabaseHelper code
What the SQLite helper code does
Updating the database: an overview
The full SQLite helper code
Your Android Toolbox
Chapter 12: Cursors and Asynctasks
The current DrinkActivity code
Specifying table and columns
Applying multiple conditions to your query
Order data in your query
Using SQL functions in queries
getReadableDatabase() versus getWritableDatabase()
The code for getting a cursor
The DrinkActivity code
The current DrinkCategoryActivity code
Creating the SimpleCursorAdapter
The revised code for DrinkCategoryActivity
Test drive the app
Respond to clicks to update the database
The new top-level activity code
Test drive the app
The AsyncTask class
The DrinkActivity.java code
A summary of the AsyncTask steps
Your Android Toolbox
Chapter 13: Services
Services work behind the scenes
The started service app
We’re going to create an IntentService
How to log messages
The full DelayedMessageService code
You start a service using startService()
Test drive the app
The full DelayedMessageService.java code
How you use the notification service
Getting your notification to start an activity
Send the notification using the notification service
The full code for DelayedMessageService.java
Test drive the app
Create a new Odometer project
How binding works
Define the binder
The Service class has four key methods
The full OdometerService.java code
Create a ServiceConnection
The full MainActivity.java code
Your Android Toolbox
Chapter 14: Material Design
Welcome to Material Design
CardViews and RecyclerViews
The Pizza app structure
Add the support libraries
Create the CardView
Create the basic adapter
Create the ViewHolders
The full code for CaptionedImagesAdapter.java
Add the RecyclerView to the layout
The PizzaMaterialFragment.java code
Specifying the layout manager
The full PizzaMaterialFragment.java code
Test drive the app
The code for PizzaDetailActivity.java
Add the interface to the adapter
The full code for fragment_top.xml
Your Android Toolbox
Appendix i: The Android Runtime (ART)
What is the Android runtime (ART)?
Performance and size
Appendix ii: The Android Debug Bridge (ADB)
adb: your command-line pal
Running a shell
Get the output from logcat
Appendix iii: The Emulator
Why the emulator is so slow
How to speed up your Android development
Appendix iv: The Top Ten Things (we didn’t cover)
1. Distributing your app
2. Content providers
3. The WebView class
4. Animation
5. Maps
6. Cursor loaders
7. Broadcast receivers
8. App widgets
9. NinePatch graphics
10. Testing
People also search for Head First Android Development A Brain Friendly Guide 2nd:
head first android development pdf
head first android development a brain-friendly guide pdf
head first c a brain-friendly guide
head first java a brain-friendly guide 3rd edition
5 brain friendly approaches to studying
Tags:
Dawn Griffiths,David Griffiths,Development,Friendly,Android