-
一本名为\"Beginning Android 2\"的优质Android书籍及其源代码
资源介绍
android好书系列,我目前找了两本,先贡献给大家。以后如果有好的资源,再上传和大家分享。
本资源是第一本。
这是一本学习android的好书,我浏览了,是老外著的,高清晰的pdf。为了方便大家学习android,我将本书所附的源码一块打包了。方便了不少,如果觉得好就顶一下吧,大家共同进步。
另外一本pro android 的下载地址: http://download.****.net/source/3139707
本书的目录结构如下:
Chapter 1: The Big Picture
Challenges of Smartphone Programming
What Androids Are Made Of
Stuff at Your Disposal
■Chapter 2: Projects and Targets
Pieces and Parts
Creating a Project
Project Structure
Root Contents
The Sweat Off Your Brow
And Now, the Rest of the Story
What You Get Out of It
Inside the Manifest
In the Beginning, There Was the Root, And It Was Good
Permissions, Instrumentations, and Applications (Oh My!)
Your Application Does Something, Right?
Achieving the Minimum
Version=Control
Emulators and Targets
Virtually There
Aiming at a Target
■Chapter 3: Creating a Skeleton Application
Begin at the Beginning
Dissecting the Activity
Building and Running the Activity
■Chapter 4: Using XML-Based Layouts
What Is an XML-Based Layout?
Why Use XML-Based Layouts?
OK, So What Does It Look Like?
What’s with the @ Signs?
And How Do We Attach These to the Java?
The Rest of the Story
■Chapter 5: Employing Basic Widgets
Assigning Labels
Button, Button, Who’s Got the Button?
Fleeting Images
Fields of Green Or Other Colors
Just Another Box to Check
Turn the Radio Up
It’s Quite a View
Useful Properties
Useful Methods
Colors
■Chapter 6: Working with Containers
Thinking Linearly
LinearLayout Concepts and Properties
LinearLayout Example
All Things Are Relative
RelativeLayout Concepts and Properties
RelativeLayout Example
Tabula Rasa
TableLayout Concepts and Properties
TableLayout Example
Scrollwork
■Chapter 7: Using Selection Widgets
Adapting to the Circumstances
Lists of Naughty and Nice
Spin Control
Grid Your Lions (or Something Like That)
Fields: Now with 35% Less Typing!
Galleries, Give or Take the Art
■Chapter 8: Getting Fancy with Lists
Getting to First Base
A Dynamic Presentation
Better Stronger Faster
Using convertView
Using the Holder Pattern
Making a List
And Checking It Twice
Adapting Other Adapters
■Chapter 9: Employing Fancy Widgets and Containers
Pick and Choose
Time Keeps Flowing Like a River
Making Progress
Seeking Resolution
Put It on My Tab
The Pieces
The Idiosyncrasies
Wiring It Together
Adding Them Up
Intents and Views
Flipping Them Off
Manual Flipping
Adding Contents on the Fly
Automatic Flipping
Getting in Someone’s Drawer
Other Good Stuff
■Chapter 10: The Input Method Framework
Keyboards, Hard and Soft
Tailored to Your Needs
Tell Android Where It Can Go
Fitting In
Unleash Your Inner Dvorak
■Chapter 11: Applying Menus
Menus of Options
Creating an Options Menu
Adding Menu Choices and Submenus
Menus in Context
Taking a Peek
Yet More Inflation
Menu XML Structure
Menu Options and XML
Inflating the Menu
■Chapter 12: Fonts
Love the One You’re With
More Fonts
Here a Glyph, There a Glyph
■Chapter 13: Embedding the WebKit Browser
A Browser, Writ Small
Loading It Up
Navigating the Waters
Entertaining the Client
Settings, Preferences, and Options (Oh My!)
Chapter 14: Showing Pop-Up Messages
Raising Toasts
Alert! Alert!
Checking Them Out
■Chapter 15: Dealing with Threads
Getting Through the Handlers
Messages
Runnables
Running in Place
Where Oh Where Has My UI Thread Gone?
Asyncing Feeling
The Theory
AsyncTask, Generics, and Varargs
The Stages of AsyncTask
A Sample Task
And Now, the Caveats
■Chapter 16: Handling Activity Life Cycle Events
Schroedinger’s Activity
Life, Death, and Your Activity
onCreate() and onDestroy()
onStart(), onRestart(), and onStop()
onPause() and onResume()
The Grace of State
■Chapter 17: Creating Intent Filters
What’s Your Intent?
Pieces of Intents
Intent Routing
Stating Your Intent(ions)
Narrow Receivers
The Pause Caveat
■Chapter 18: Launching Activities and Subactivities
Peers and Subs
Start ’Em Up
Make an Intent
Make the Call
Tabbed Browsing, Sort Of
■Chapter 19: Handling Rotation
A Philosophy of Destruction
It’s All the Same, Just Different
Now with More Savings!
DIY Rotation
Forcing the Issue
Making Sense of It All
■Chapter 20: Working with Resources
The Resource Lineup
String Theory
Plain Strings
String Formats
Styled Text
Styled String Formats
Got the Picture?
XML: The Resource Way
Miscellaneous Values
Dimensions
Colors
Arrays
Different Strokes for Different Folks
■Chapter 21: Using Preferences
Getting What You Want
Stating Your Preference
And Now, a Word from Our Framework
Letting Users Have Their Say
Adding a Wee Bit o' Structure
The Kind of Pop-Ups You Like
■Chapter 22: Managing and Accessing Local Databases
The Database Example
A Quick SQLite Primer
Start at the Beginning
Setting the Table
Makin’ Data
What Goes Around Comes Around
Raw Queries
Regular Queries
Building with Builders
Using Cursors
Data, Data, Everywhere
■Chapter 23: Accessing Files
You and the Horse You Rode in On
Readin’ ’n Writin’
■Chapter 24: Leveraging Java Libraries
The Outer Limits
Ants and JARs
Following the Script
And Not a Drop to Drink
Reviewing the Script
■Chapter 25: Communicating via the Internet
REST and Relaxation
HTTP Operations via Apache HttpClient
Parsing Responses
Stuff to Consider
■Chapter 26: Using a Content Provider
Pieces of Me
Getting a Handle
Makin’ Queries
Adapting to the Circumstances
Give and Take
Beware of the BLOB!
■Chapter 27: Building a Content Provider
First, Some Dissection
Next, Some Typing
Creating Your Content Provider
Step 1: Create a Provider Class
Step 2: Supply a Uri
Step 3: Declare the Properties
Step 4: Update the Manifest
Notify-on-Change Support
■Chapter 28: Requesting and Requiring Permissions
Mother, May I?
Halt! Who Goes There?
Enforcing Permissions via the Manifest
Enforcing Permissions Elsewhere
May I See Your Documents?
■Chapter 29: Creating a Service
Service with Class
There Can Only Be One
Manifest Destiny
Lobbing One Over the Fence
Callbacks
Broadcast Intents
Where’s the Remote? And the Rest of the Code?
■Chapter 30: Invoking a Service
The Ties That Bind
Catching the Lob
■Chapter 31: Alerting Users via Notifications
Types of Pestering
Hardware Notifications
Icons
Seeing Pestering in Action
■Chapter 32: Accessing Location-Based Services
Location Providers: They Know Where You’re Hiding
Finding Yourself
On the Move
Are We There Yet? Are We There Yet? Are We There Yet?
TestingTesting
■Chapter 33: Mapping with MapView and MapActivity
Terms, Not of Endearment
Piling On
The Bare Bones
Exercising Your Control
Zoom
Center
Rugged Terrain
Layers upon Layers
Overlay Classes
Drawing the ItemizedOverlay
Handling Screen Taps
My, Myself, and MyLocationOverlay
The Key to It All
■Chapter 34: Handling Telephone Calls
Report to the Manager
You Make the Call!
■Chapter 35: Development Tools
Hierarchical Management
Delightful Dalvik Debugging Detailed, Demoed
Logging
File Push and Pull
Screenshots
Location Updates
Placing Calls and Messages
Put It on My Card
Creating a Card Image
Inserting the Card
■Chapter 36: Handling Multiple Screen Sizes
Taking the Default
Whole in One
Think About Rules, Rather Than Positions
Consider Physical Dimensions
Avoid Real Pixels
Choose Scalable Drawables
Tailor-Made, Just for You (and You, and You, and)
Add
Resources and Resource Sets
Finding Your Size
Ain’t Nothing Like the Real Thing
Density Differs
Adjusting the Density
Accessing Actual Devices
Ruthlessly Exploiting the Situation
Replace Menus with Buttons
Replace Tabs with a Simple Activity
Consolidate Multiple Activities
Example: EU4You
The First Cut
Fixing the Fonts
Fixing the Icons
Using the Space
What If It’s Not a Browser?
What Are a Few Bugs Among Friends?
■Chapter 37: Dealing with Devices
This App Contains Explicit Instructions
Button, Button, Who’s Got the Button?
A Guaranteed Market
The Down and Dirty Details
Archos 5 Android Internet Tablet
Motorola CLIQ/DEXT
Motorola DROID/Milestone
Google/HTC Nexus One
Motorola BACKFLIP
■Chapter 38: Handling Platform Changes
Brand Management
More Things That Make You Go Boom
View Hierarchy
Changing Resources
Handling API Changes
Detecting the Version
Wrapping the API
■Chapter 39: Where Do We Go from Here?
Questions—Sometimes with Answers
Heading to the Source
Getting Your News Fix
- 上一篇: 百度地图定位
- 下一篇: Android 基于XMPP协议IM聊天实现(客户端+服务端) 源码