1Displaying Bitmaps Efficiently (位图有效显示)
来源:互联网 发布:传神翻译软件 编辑:程序博客网 时间:2024/05/29 00:30
英文不是很好,但是还是想强迫自己去阅读英文文档,毕竟android是外国人弄的。。。
翻译全凭词典,肯定很水,翻译不对的地方欢迎留言
Learn how to use common techniques to process and load Bitmap objects in a way that keeps your user interface (UI) components responsive and avoids exceeding your application memory limit.
学习如何使用常见技术处理和加载位图方式保持你使用UI控件响应和避免应用内存溢出。
If you're not careful, bitmaps can quickly consume your available memory budget leading to an application crash due to the dreaded exception: java.lang.OutofMemoryError: bitmap size exceeds VM budget.
如果你不小心,位图会快速消耗你的可用内存预算导致应用崩溃由于可怕的异常:
There are a number of reasons why loading bitmaps in your Android application is tricky:
这是一些理由为什么你的android应用加载位图是棘手的:
· Mobile devices typically have constrained system resources.
· 移动设备通常会限制系统资源。
Android devices can have as little as 16MB of memory available to a single application.
android设备提供给一个应用少于16MB的可用内存。
The Android Compatibility Definition Document (CDD), Section 3.7.
android兼容解释文档(CDD),3.7节。
Virtual Machine Compatibility gives the required minimum application memory for various screen sizes and densities.
虚拟机通常提供应用所需的最小内存在不同屏幕大小和密度。
屏幕大小屏幕尺寸应用内存 small / nomal / large ldpi / mdpi 16MB small / nomal / large tvdpi / hdpi 32MB small / nomal / large xhdpi 64MB xlarge mdpi 32MB xlarge tvdpi / hdpi 64MB xlarge xhdpi 128MB
Applications should be optimized to perform under this minimum memory limit. However, keep in mind many devices are configured with higher limits.
应用最好运行在这个最小限制内存下,不过,记住大多数设备配置较高的限制。
Bitmaps take up a lot of memory, especially for rich images like photographs. For example, the camera on the Galaxy Nexus takes photos up to 2592x1936 pixels (5 megapixels).
位图占用许多内存,尤其是类似照片这样的大量图像。例如用Galaxy Nexus拍摄2592X1936像素(5百万像素)照片。
If the bitmap configuration used is ARGB_8888
(the default from the Android 2.3 onward) then loading this image into memory takes about 19MB of memory (2592*1936*4 bytes), immediately exhausting the per-app limit on some devices.
如果位图使用ARGB_8888(Android2.3后默认)配置用内存加载这个图像要大约花费19MB的内存(2592*1936*4 bytes),立即突破每个应用的限制在一些设备上。
- Android app UI’s frequently require several bitmaps to be loaded at once. Components such as
ListView
,GridView
andViewPager
commonly include multiple bitmaps on-screen at once with many more potentially off-screen ready to show at the flick of a finger.
- 1Displaying Bitmaps Efficiently (位图有效显示)
- Displaying Bitmaps Efficiently (位图有效显示)
- android有效显示图片Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently 高效的显示图片
- Displaying Bitmaps Efficiently(1)-Loading Large Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently -
- Displaying Bitmaps Efficiently
- Android-Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently总结
- Displaying Bitmaps Efficiently
- Displaying Bitmaps Efficiently -Loading Large Bitmaps Efficiently
- Displaying Bitmaps Efficiently(3)-Caching Bitmaps
- 2 Loading Large Bitmaps Efficiently(高效加载大尺寸位图)
- 我看过有一种莫名的动力,你呢?
- linux 下设置环境变量
- 最长上升子序列两种算法o(n^2),o(nlogn)
- dsPIC33F串口发送一个数组到发送寄存器-UART
- 1Displaying Bitmaps Efficiently (位图有效显示)
- S3C6410 TFT-LCD控制器的设置(LCD型号为WXCAT43,开发板为飞凌OK6410B)
- 二叉树转换为双向链表
- CSDN我来了
- Spring中 Transactional配置
- ECCMS下显示文章内容的图片时超出大小自动缩小,点击放大图片
- Cocos2d-x 的内存管
- HDU 1421 搬寝室
- Android完全退出应用程序