注冊(cè) | 登錄讀書(shū)好,好讀書(shū),讀好書(shū)!
讀書(shū)網(wǎng)-DuShu.com
當(dāng)前位置: 首頁(yè)出版圖書(shū)科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)程序設(shè)計(jì)綜合Learning Android(中文版)

Learning Android(中文版)

Learning Android(中文版)

定 價(jià):¥49.00

作 者: (美)加爾根塔(Gargenta,M.)著,李亞舟,任中龍,杜鋼 譯.
出版社: 電子工業(yè)出版社
叢編項(xiàng):
標(biāo) 簽: 移動(dòng)開(kāi)發(fā)

購(gòu)買(mǎi)這本書(shū)可以去


ISBN: 9787121172632 出版時(shí)間: 2012-07-01 包裝: 平裝
開(kāi)本: 16開(kāi) 頁(yè)數(shù): 284 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

  《Learning Android(中文版)》為Android開(kāi)發(fā)入門(mén)圖書(shū),循序漸進(jìn)地介紹了如何利用Android基本構(gòu)件來(lái)實(shí)現(xiàn)構(gòu)造用戶(hù)界面、存儲(chǔ)數(shù)據(jù)、連接網(wǎng)絡(luò)等實(shí)踐中必不可少的需求。本書(shū)以親手實(shí)現(xiàn)一個(gè)類(lèi)Twitter的應(yīng)用為主線,通過(guò)不斷為其添加功能展開(kāi)講解。而這一學(xué)習(xí)過(guò)程積累出的代碼模式庫(kù),可以靈活運(yùn)用于真實(shí)Android應(yīng)用開(kāi)發(fā)。本書(shū)內(nèi)容包括但不限于:Android平臺(tái)概覽、Android設(shè)計(jì)架構(gòu)、Android開(kāi)發(fā)環(huán)境配置、基本Android的用戶(hù)界面構(gòu)建、UI元件組織方法、構(gòu)建執(zhí)行后臺(tái)任務(wù)與更新數(shù)據(jù)的服務(wù)、AIDL與NDK介紹等。

作者簡(jiǎn)介

  Marko Gargenta,是舊金山Marakana培訓(xùn)公司的創(chuàng)始人與首席Android專(zhuān)家。他創(chuàng)建了Android Bootcamp與AndroidInternals兩門(mén)課程,并培訓(xùn)了來(lái)自四大洲超過(guò)1000名開(kāi)發(fā)者。他的客戶(hù)包括高通、索尼愛(ài)立信、摩托羅拉、夏普、思科與美國(guó)國(guó)防部。

圖書(shū)目錄

前言..................................................................................xvii
第1章 Android概述............................................................1
概述..............................................................................................................................1
完整性.................................................................................................................1
開(kāi)源平臺(tái).............................................................................................................2
為移動(dòng)設(shè)備而設(shè)計(jì).............................................................................................2
歷史..............................................................................................................................3
Google的動(dòng)機(jī)......................................................................................................3
開(kāi)放手持設(shè)備聯(lián)盟.............................................................................................3
Android的版本............................................................................................................4
總結(jié)..............................................................................................................................5
第2章 Android的架構(gòu)......................................................... 7
架構(gòu)概述......................................................................................................................7
Linux系統(tǒng)....................................................................................................................7
可移植性.............................................................................................................7
安全性.................................................................................................................8
豐富的特性.........................................................................................................8
本地庫(kù)..........................................................................................................................9
Dalvik 虛擬機(jī)..............................................................................................................9
Android與Java...................................................................................................10
應(yīng)用程序框架............................................................................................................11
應(yīng)用程序....................................................................................................................12
APK文件...........................................................................................................12
應(yīng)用程序簽名...................................................................................................12
應(yīng)用程序發(fā)布...................................................................................................12
總結(jié)............................................................................................................................13
第3章 快速入門(mén)...............................................................15
安裝Android SDK.....................................................................................................15
設(shè)置PATH環(huán)境變量..........................................................................................16
安裝 Eclipse.......................................................................................................16
Eclipse的工作區(qū)................................................................................................17
安裝Android 開(kāi)發(fā)工具.....................................................................................17
Hello, World程序.......................................................................................................18
創(chuàng)建新項(xiàng)目.......................................................................................................18
Manifest文件.....................................................................................................20
Layout(布局)XML代碼...............................................................................21
Strings(字符串)文件....................................................................................21
R(資源)文件.................................................................................................22
Java源碼文件....................................................................................................22
仿真器........................................................................................................................23
仿真器和真機(jī)...................................................................................................25
總結(jié)............................................................................................................................26
第4章 基本構(gòu)件...............................................................27
什么是基本構(gòu)件........................................................................................................27
一個(gè)實(shí)際的例子........................................................................................................27
活動(dòng)(Activity)......................................................................................................28
活動(dòng)的生命周期...............................................................................................28
Intent..........................................................................................................................30
服務(wù)(Service)........................................................................................................31
內(nèi)容提供器(Content Provider)............................................................................32
廣播接收器(Broadcast Receiver)........................................................................34
應(yīng)用程序上下文(Application Context)...............................................................34
總結(jié)............................................................................................................................35
第5章 Yamba項(xiàng)目簡(jiǎn)介 ....................................................37
Yamba 應(yīng)用程序.......................................................................................................37
設(shè)計(jì)原則....................................................................................................................39
項(xiàng)目設(shè)計(jì)....................................................................................................................40
第1部分:Android用戶(hù)界面....................................................................................41
構(gòu)建一個(gè)活動(dòng)...................................................................................................41
網(wǎng)絡(luò)和多線程...................................................................................................41
調(diào)試Android 程序.............................................................................................41
第2部分:首選項(xiàng)、文件系統(tǒng)、選項(xiàng)菜單及Intent................................................41
活動(dòng)...................................................................................................................42
菜單系統(tǒng)與Intent..............................................................................................42
文件系統(tǒng)...........................................................................................................42
第3部分:Android服務(wù)............................................................................................42
服務(wù)...................................................................................................................42
應(yīng)用程序?qū)ο?..................................................................................................42
第4部分:使用數(shù)據(jù)庫(kù)..............................................................................................43
SQLite及Android對(duì)它的支持...........................................................................43
再次重構(gòu)代碼...................................................................................................43
第5部分:列表(List)與適配器(Adapter)......................................................43
時(shí)間軸(Timeline)活動(dòng).................................................................................43
再重構(gòu)一次.......................................................................................................44
第6部分:廣播接收器(Broadcast Receiver)......................................................44
啟動(dòng)接收器與網(wǎng)絡(luò)連接接收器.......................................................................44
時(shí)間軸(Timeline)接收器.............................................................................44
權(quán)限...................................................................................................................44
第7部分:內(nèi)容提供器(Content Provider)..........................................................44
狀態(tài)數(shù)據(jù)...........................................................................................................45
Android小部件..................................................................................................45
第8部分:系統(tǒng)服務(wù)..................................................................................................45
指南針與位置...................................................................................................45
Intent服務(wù)、提醒及通知..................................................................................45
總結(jié)............................................................................................................................46
第6章 Android用戶(hù)界面 ...................................................47
創(chuàng)建用戶(hù)界面的兩種方法........................................................................................47
聲明式的用戶(hù)界面...........................................................................................47
編程式的用戶(hù)界面...........................................................................................48
各取所長(zhǎng)...........................................................................................................48
控件與布局................................................................................................................48
LinearLayout......................................................................................................49
TableLayout.......................................................................................................50
FrameLayout......................................................................................................50
RelativeLayout...................................................................................................50
AbsoluteLayout..................................................................................................50
啟動(dòng)Yamba項(xiàng)目........................................................................................................50
StatusActivity布局.....................................................................................................52
控件的重要屬性...............................................................................................54
字符串資源.......................................................................................................56
StatusActivity Java類(lèi).................................................................................................56
編寫(xiě)具體應(yīng)用的對(duì)象,以及初始化相關(guān)代碼...............................................57
保存文件:編譯代碼和構(gòu)建項(xiàng)目...................................................................59
添加庫(kù)jtwitter.jar...............................................................................................60
更新Manifest文件,獲取Internet權(quán)限.............................................................61
Android的日志機(jī)制..................................................................................................62
LogCat................................................................................................................63
Android的線程機(jī)制..................................................................................................65
單線程執(zhí)行.......................................................................................................65
多線程執(zhí)行.......................................................................................................66
AsyncTask..........................................................................................................67
其他UI事件...............................................................................................................70
添加圖片與色彩........................................................................................................75
添加圖片...........................................................................................................75
添加色彩...........................................................................................................78
多版本資源文件........................................................................................................80
優(yōu)化用戶(hù)界面............................................................................................................81
Hierarchy Viewer 工具......................................................................................82
總結(jié)............................................................................................................................83
第7章 首選項(xiàng)、文件系統(tǒng)、選項(xiàng)菜單及Intent .................. 85
首選項(xiàng)........................................................................................................................85
資源文件...........................................................................................................86
PrefsActivity類(lèi)..................................................................................................89
修改Manifest文件.............................................................................................90
選項(xiàng)菜單....................................................................................................................91
菜單的資源文件...............................................................................................92
Android系統(tǒng)資源..............................................................................................93
更新StatusActivity,加載菜單.........................................................................93
更新StatusActivity,捕獲菜單事件.................................................................94
字符串資源.......................................................................................................95
Shared Preferences.....................................................................................................96
文件系統(tǒng)簡(jiǎn)介............................................................................................................98
瀏覽文件系統(tǒng)...................................................................................................98
文件系統(tǒng)的分區(qū)...............................................................................................99
系統(tǒng)分區(qū).........................................................................................................100
SDCard 分區(qū)....................................................................................................100
用戶(hù)數(shù)據(jù)分區(qū).................................................................................................100
文件系統(tǒng)的安全機(jī)制.....................................................................................101
總結(jié)..........................................................................................................................102
第8章 服務(wù).....................................................................103
Yamba的Application對(duì)象........................................................................................104
YambaApplication類(lèi).......................................................................................104
更新Manifest文件...........................................................................................106
簡(jiǎn)化 StatusActivity..........................................................................................107
UpdaterService.........................................................................................................108
創(chuàng)建 UpdaterServiceJava類(lèi)............................................................................108
更新Manifest文件...........................................................................................110
添加菜單項(xiàng).....................................................................................................111
更新選項(xiàng)菜單的事件處理.............................................................................111
測(cè)試服務(wù).........................................................................................................112
在服務(wù)中循環(huán)..........................................................................................................113
測(cè)試服務(wù).........................................................................................................116
從 Twitter 讀取數(shù)據(jù)................................................................................................117
測(cè)試服務(wù).........................................................................................................121
總結(jié)..........................................................................................................................121
第9章 數(shù)據(jù)庫(kù).................................................................123
關(guān)于 SQLite.............................................................................................................123
DbHelper類(lèi)..............................................................................................................124
數(shù)據(jù)庫(kù)模式及其創(chuàng)建.....................................................................................124
4種主要操作...................................................................................................125
游標(biāo).................................................................................................................126
第一個(gè)例子..............................................................................................................127
修改UpdaterService.................................................................................................129
測(cè)試服務(wù).........................................................................................................133
數(shù)據(jù)庫(kù)約束.....................................................................................................135
重構(gòu)數(shù)據(jù)庫(kù)訪問(wèn)......................................................................................................136
總結(jié)..........................................................................................................................142
第10章 列表與適配器 ....................................................145
TimelineActivity......................................................................................................145
TimelineActivity的基本布局..................................................................................146
ScrollView簡(jiǎn)介................................................................................................146
創(chuàng)建TimelineActivity類(lèi)..................................................................................147
關(guān)于適配器..............................................................................................................150
為T(mén)imelineActivity添加ListView...................................................................151
創(chuàng)建一個(gè)單行消息布局.................................................................................152
在TimelineActivity.java中創(chuàng)建適配器...........................................................153
TimelineAdapter......................................................................................................155
ViewBinder: 取代TimelineAdapter的更好選擇.....................................................158
更新Manifest文件...................................................................................................160
程序初始設(shè)置.................................................................................................162
Base Activity............................................................................................................163
服務(wù)開(kāi)關(guān).........................................................................................................163
總結(jié)..........................................................................................................................170
第11章 廣播接收器(Broadcast Receiver) ................. 171
關(guān)于Broadcast Receiver..........................................................................................171
BootReceiver............................................................................................................172
將BootReceiver注冊(cè)到AndroidManifest文件................................................173
測(cè)試 BootReceiver..........................................................................................173
TimelineReceiver.....................................................................................................173
廣播Intent................................................................................................................175
Network Receiver....................................................................................................177
添加用于發(fā)送和接收廣播的自定義權(quán)限..............................................................180
在Manifest文件中聲明權(quán)限...........................................................................180
為更新服務(wù)應(yīng)用權(quán)限機(jī)制.............................................................................181
為T(mén)imelineReceiver應(yīng)用權(quán)限機(jī)制.................................................................183
總結(jié)..........................................................................................................................183
第12章 內(nèi)容提供器(Content Provider)...................... 185
創(chuàng)建Content Provider..............................................................................................185
定義URI...........................................................................................................186
插入數(shù)據(jù).........................................................................................................187
更新數(shù)據(jù).........................................................................................................188
刪除數(shù)據(jù).........................................................................................................189
查詢(xún)數(shù)據(jù).........................................................................................................190
獲取數(shù)據(jù)類(lèi)型.................................................................................................191
更新Android Manifest文件.............................................................................192
在小部件中使用Content Provider..........................................................................192
實(shí)現(xiàn)YambaWidget類(lèi).......................................................................................193
創(chuàng)建XML布局.................................................................................................196
創(chuàng)建AppWidgetProviderInfo文件...................................................................197
更新Manifest文件...........................................................................................197
測(cè)試小部件.....................................................................................................198
總結(jié)..........................................................................................................................198
第13章 系統(tǒng)服務(wù)...........................................................201
實(shí)例:指南針..........................................................................................................201
使用系統(tǒng)服務(wù)的一般步驟.............................................................................201
獲取指南針的更新.........................................................................................202
指南針的主活動(dòng).............................................................................................203
自定義的表盤(pán)小部件.....................................................................................206
位置服務(wù)..................................................................................................................208
實(shí)例: Where Am I............................................................................................208
用上位置服務(wù),重構(gòu)Yamba..................................................................................213
更新首選項(xiàng).....................................................................................................213
更新Yamba程序..............................................................................................214
更新Status Activity..........................................................................................215
Intent服務(wù)................................................................................................................219
Alarms..............................................................................................................222
在首選項(xiàng)中添加Interval選項(xiàng).........................................................................223
更新BootReceiver............................................................................................224
發(fā)送通知..................................................................................................................226
總結(jié)..........................................................................................................................229
第14章 Android接口描述語(yǔ)言 ........................................231
實(shí)現(xiàn)遠(yuǎn)程服務(wù)..........................................................................................................231
編寫(xiě)AIDL........................................................................................................232
實(shí)現(xiàn)服務(wù).........................................................................................................233
實(shí)現(xiàn)一個(gè)Parcel................................................................................................235
注冊(cè)到Manifest文件.......................................................................................236
實(shí)現(xiàn)遠(yuǎn)程客戶(hù)端......................................................................................................237
綁定到遠(yuǎn)程服務(wù).............................................................................................238
測(cè)試運(yùn)行.........................................................................................................241
總結(jié)..........................................................................................................................242
第15章 Native Development Kit (NDK) .........................243
NDK是什么.............................................................................................................243
NDK的功能.............................................................................................................244
工具鏈.............................................................................................................244
打包庫(kù)文件.....................................................................................................244
文檔與標(biāo)準(zhǔn)頭文件.........................................................................................244
NDK實(shí)例:計(jì)算菲波那契數(shù)列.............................................................................245
FibLib...............................................................................................................246
JNI 頭文件.......................................................................................................247
C 實(shí)現(xiàn)..............................................................................................................249
Makefile...........................................................................................................251
構(gòu)建共享庫(kù).....................................................................................................251
Fibonacci Activity............................................................................................251
測(cè)試所有的工作.............................................................................................253
總結(jié)..........................................................................................................................254
索引.................................................................................255 

本目錄推薦

掃描二維碼
Copyright ? 讀書(shū)網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)