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 在特定情况下为其所有的子类启用,例如在一个滚动的过程中。 此属性可以保留在内存中的缓存后其初始的使用。 坚持缓存会消耗更多的内存,但可能会阻止频繁的垃圾回收是反复创建缓存。 默认情况下持续存在设置为滚动。

  其属性值只有以下几种:

  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中native进程内存泄露的调试技巧
  5. Android源码分析之WindowManager.LayoutParams属性更新过程
  6. Android 内存浅析【管理、机制、分析】

随机推荐

  1. Android DrawBitmap绘制图像
  2. Android之Shared Preferences
  3. Android OpenGL ES2.0编程教程系列之总览
  4. 解析Android重要包功能描述
  5. Android 获得sdcard大小与内存大小工具类
  6. Android时间倒计时的简单实线
  7. android的ANR原理剖析及图解(基于android
  8. Android studio引用包冲突
  9. Android程序安装和卸载
  10. 关于Android的TimePicker和DatePicker一