出版时间:2011-12 出版社:东南大学出版社 作者:(美)梅德尼克斯 等著 页数:482
Tag标签:无
内容概要
《Android程序设计(影印版)》深度探索Android的核心构造模块和应用程序编程接口,并且学习如何创建适用于全系列Android设备的引人注目的应用程序。你将使用经过验证的方法进行应用设计和实现——包括在你的项目起步时可用的应用程序框架。
作者简介
Zigurd Mednieks是一位咨询师,为领先外包厂商,企业和风险投资开发基于Android的系统提供咨询。
Laird Dornin 是一家主要无线运营商的高级工程师,在Java,
Android,J2ME,SaveJe和WebKit等方面具有广泛经验。
书籍目录
Preface
Tools and Basics
About the Android Framework
A Skeleton Application for Android
Advanced Topics
Index
章节摘录
版权页: 插图: Eclipse refactoring tools are your best friend.With just a few clicks you can create anew project for the now standalone subtree,cut and paste the content provider codeinto it,and then rename the packages as appropriate.Eclipse will fix most things,including the changed references. It's worth a reminder that shortcutting package names-using a package named justweatherprediction,for instance-is a bad idea.Even if you are pretty sure the code youare creating will never be used outside its current context,you may want to use externally produced code in that context.Don't set yourself up for a name collision.Concurrency in AndroidAs mentioned in Chapter 2,writing correct concurrent programs can be very difficult.The Android libraries provide some convenient tools to make concurrency both easierand safer. When discussing concurrent programs,developers get into the habit of talking asthough writing code with multiple threads actually causes those threads to execute atthe same time-as though threading actually makes-the program run faster.Of course,it isn't quite that simple.Unless there are multiple processors to execute the threads,a program that needs to perform multiple,unrelated,computebound tasks will complete those tasks no more quickly if they are implemented as separate threads than itwill if they are on the same thread.In fact,on a single processor,the concurrent versionmay actually run somewhat more slowly because of the overhead due to contextswitching. Multithreaded Java applications were around for a long time before most people couldafford machines with more than one processor on which to run them.In the Androidworld,multithreading is an essential tool,even though the majority of devices willprobably have only a single CPU for another year or so.So what is the point of concurrency if not to make a program run faster?If you've been programming for any length of time at all,you probably don't even thinkabout how absolutely essential it is that the statements in your code are executed in arigid sequential order.The execution of any given statement must,unconditionally,happen before the execution of the next statement.Threads are no more than an explicitway of relaxing this constraint.They are the abstraction that developers use to make itpossible to write code that is still ordered,logical,and easy to read,even when tasksembodied by the code are not related by ordering.
媒体关注与评论
“终于!有本深入细节的书了!欢呼!” - Perry J. Nally FeetDog.com “了不起的著作。我读了几章就无法放下。” - Wenjing Dai 开发人员
编辑推荐
《Android程序设计(影印版)》深入探究传感器、原生开发、三维图形以及其他主题,并且探索发现如何在你所选择的平台上构建应用程序。如果你是一个技能中等以上的程序员,你将学会如何制作了不起的Android应用程序。
名人推荐
“终于!有本深入细节的书了!欢呼!” ——Perry J.Nally FeetDog.com “了不起的著作。我读了几章就无法放下。” ——Wenjing Dai开发人员
图书封面
图书标签Tags
无
评论、评分、阅读与下载