Android is fairly unique in the ways it allows multiple applications to run at the same time.
android 使用十分独特的方式 允许多任务在同一时间运行.
Developers coming from a different platform may find the way it operates surprising.
开发者在不同的平台中发现这种方式会出现意想不到的事情.
Understanding its behavior is important for designing applications that will work well and integrate seamlessly with the rest of the Android platform.
了解这种行为在设计应用程序中十分重要,这样可以使程序运行的完美和无缝结合的保持在android平台中
This article covers the reasons for Android's multitasking design, its impact on how applications work, and how you can best take advantage of Android's unique features.
这篇文章展示的就是如何设计android程序的多任务,这紧紧的关系着应用程序是如何工作,和如何让你android程序拥有独特的高级特性.
Design considerations:设计的约束
Mobile devices have technical limitations and user experience requirements not present in desktop or web systems. 移动设备在技术上有着限制和用户体验需求不同于当前的桌面电脑和网络系统.
The first two requirements highlight an interesting conflict. 有一个有趣的冲突在第一个条件和第二个条件. We don't want users to worry about closing their apps, but rather make it appear that all of the applications are always running. 我们不想用户担忧如何关闭他们的程序,但是这样会出现所有程序都总是在运行当中. At the same time, mobile devices have hard limits on memory use, so that a system will degrade or even start failing very quickly as it needs more RAM than is available; a desktop computer, with swap, in contrast will simply start slowing down as it needs to page RAM to its swap space. 在同一时间,移动设备只有十分有限的内存在使用,导致系统将会减慢或者甚至使一个需要很多空闲RAM的程序无法启动, 与之相比较,在桌面电脑中,同样使用交换空间,程序仅仅减慢启动速度,需要用到的交换空间由页面缓存代替. These competing constraints were a key motivation for Android's design. 在android的程序设计中这些约束都是提升你程序性能的关键.PS:翻译果然不是一件容易的事情…水平太渣了…有错误欢迎指正…估计就翻这段了…能力不足呀… |
When does an application "stop"?:什么时候停止你的程序?
Explicitly running in the background:明确的运行在后台
The value of generic components:基础组件的价值
本文转自 liam2199 博客,原文链接: http://blog.51cto.com/youxilua/773091 如需转载请自行联系原作者