android:persistentDrawingCache (Google官方译文)

Defines the persistence of the drawing cache. The drawing cache might be enabled by a ViewGroup for all its children in specific situations (for instance during a scrolling.) This property lets you persist the cache in memory after its initial usage. Persisting the cache consumes more memory but may prevent frequent garbage collection is the cache is created over and over again. By default the persistence is set to scrolling.

定义绘图的高速缓存的持久性。 绘图缓存可能由一个ViewGroup在特定情况下为其所有的子类启用,例如在一个滚动的过程中。 此属性可以在初次使用后保留在其在内存中的缓存。 坚持缓存会消耗更多的内存,但可能会阻止频繁的垃圾回收是反复创建缓存。 默认情况下持续存在设置为滚动。

Must be one or more (separated by '|') of the following constant values.

Xml文件中可以使用一下的值:

Constant Value Description
none 0x0 The drawing cache is not persisted after use.
animation 0x1 The drawing cache is persisted after a layout animation.
scrolling 0x2 The drawing cache is persisted after a scroll.
all 0x3 The drawing cache is always persisted.

更多相关文章

  1. Android 内存泄漏场景分析
  2. Android 内存泄漏优化汇总
  3. android 查看内存使用情况
  4. Android内存管理基本介绍
  5. 「抄底 Android 内存优化 2」 —— Linux 内存管理
  6. Android Bitmap内存优化
  7. android内存机制
  8. Android 代码实现应用强制装到手机内存
  9. 高性能缓存系统(Memcached)的实例介绍

随机推荐

  1. Android学习路线(五)开启另一个Activity
  2. Android中的样式和主题(style & theme)
  3. android javascript 调用activity
  4. Android 短信链接打开APP
  5. Android:实现隐藏应用功能
  6. 赵雅智:android使用adb命令详解附图
  7. Intent组件构成,解析机制
  8. Android(安卓)enum(枚举类型)使用详解
  9. java.io.IOException:Can't read [F:\..
  10. Android开发全程记录(十五)——android调用