- 博客(1)
- 资源 (1)
- 收藏
- 关注
原创 程序员为什么要写博客?
首先,我是一名码农。 好吧,这是我的第一篇博文。 从很久这前我就想着要开一个博客,写上我对学习技术以来的点点滴滴。可是一直以来,都因为这样或那样的原因,而未能实施。而今,终于下定决心,写下我的第一篇博文。 什么是博客? 首先,我或者我们应该知道,什么是博客,什么是博文。 Blog 全名Web log,中文意思是“网络日志”,后来缩写为Blog。它是继Email、BBS、IM之后出现的
2013-07-27 15:44:58 814
Android-3.0-Application-Development-Cookbook
英文原版
Preface 1
Chapter 1: Activities 5
Introduction 5
Declaring an activity 6
Starting a new activity with an intent object 10
Switching between activities 14
Returning a result from an activity 17
Storing an activity's state 20
Storing persistent activity data 24
Managing the activity lifecycle 27
Chapter 2: Layouts 33
Introduction 33
Declaring a layout 34
Applying a relative layout 37
Applying a table layout 40
Using ListViews and ListAdapters 42
Applying gravity and weight 45
Controlling layout during runtime 48
Optimizing for tablets and multiple screens 50
Dividing the screen into fragments 53
Running 3.0 and higher applications on older platforms 58
Chapter 3: Widgets 61
Introduction 61
Inserting a widget into a layout 62
Adding images to widgets 64
Creating a widget at runtime 68
Applying a style 70
ii
Table of Contents
Turning a style into a theme 73
Using a platform style or theme 76
Creating a custom component 78
Chapter 4: Menus 81
Introduction 81
Creating and inflating an options menu 82
Designing Android compliant menu icons 86
Building a context sensitive menu 88
Handling menu selections 91
Building menu groups of checkable items 94
Applying shortcut keys and submenus 97
Chapter 5: Data and Security 101
Introduction 101
Using internal storage for private data 102
Storing public data on external storage 104
Creating a SQLite database 107
Sharing multimedia files across applications with Content Providers 110
Defining and enforcing permissions 112
Providing backup functionality 115
Chapter 6: Detecting User Activity 119
Introduction 119
Reading a device's orientation 120
Measuring motion with the accelerometer 122
Listing available sensors 127
Recognizing a touch event 128
Detecting multi-touch elements 132
Recognizing gestures 134
Handling multi-touch gestures 136
Controlling on screen keyboards 139
Chapter 7: Notifying the User 145
Introduction 145
Displaying an alert dialog 146
Displaying a progress dialog 150
Customizing a dialog 152
Making a Toast 154
Notifying the user with the status bar 157
Using the Notifcation.Builder class 161
iii
Table of Contents
Chapter 8: Graphics and Animation 163
Introduction 163
Adding graphics to the ImageView class 164
Rotating an image with a matrix 167
Using ShapeDrawable and Paint 171
Drawing with a Canvas 173
Using tween animations 176
Animating with Honeycomb APIs 180
Creating stop frame animations 183
Working with OpenGL 186
Chapter 9: Multimedia 191
Introduction 191
Playing an audio file from within an application 192
Playing back video from external memory 195
Playing multiple sounds with a SoundPool 198
Recording audio 200
Recording video 202
Capturing photos with the camera 204
Chapter 10: Telephony, Networks, and the Web 209
Introduction 209
Initiating a phone call 210
Listening for phone events 212
Sending SMS messages 215
Monitoring SMS messages 218
Connecting to WiFi 220
Connecting Bluetooth devices 223
Including web content 225
Chapter 11: GPS, Locations, and Maps 229
Introduction 229
Detecting a device's location 230
Listening for location changes 232
Setting up Google Maps 235
Zooming in on a MapView 238
Setting a map's location with a GeoPoint 241
Marking a location on a map with an overlay 243
Index 247
2012-04-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人