网上很多人在寻找这个答案,下面将API中的解释进行翻译:

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

  其属性值只有以下几种:

  ConstantValueDescription

  none0x0The drawing cache is not persisted after use.

  animation0x1The drawing cache is persisted after a layout animation.

  scrolling0x2The drawing cache is persisted after a scroll.

  all0x3The drawing cache is always persisted.

更多相关文章

  1. Android: 屏幕截图
  2. android TextView 如何实现消息滚动
  3. Android(安卓)Design Support Library
  4. Android(安卓)网络下载图片
  5. android设置Webview的滚动条属性
  6. android之横向滚动图
  7. Android图片下载缓存库picasso解析
  8. Android(安卓)开发优化 知识点
  9. Android(安卓)跑马灯效果

随机推荐

  1. android XMl 解析神奇xstream 二: 把对象
  2. BroadcastReciver 广播接收者---DAY06 20
  3. imageButton被边框包围的原因、解决办法
  4. android webview 设置背景透明色
  5. Android移植到Asus P535步骤说明
  6. Android(安卓)Handler消息机制(源码分析)
  7. Android设置权限问题
  8. Android开机广播和关机广播
  9. Android中Handler Runnable与Thread的区
  10. 教你配置安卓开发环境!(附带开发通讯教程)