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. Gradle离线配置、.android、.AndroidStudio、.gradle、.m2缓存文
  3. Android为每个应用程序分配的内存大小是多
  4. android拍照造成内存泄露问题
  5. Android开发学习笔记(十二) 获取系统可用内存
  6. Android中图片占用内存的计算
  7. android性能之一:内存泄露、内存溢出的区别及原理分析
  8. android平板上的GridView视图缓存优化
  9. Android 内存溢出解决方案(OOM) 整理总结

随机推荐

  1. Android之Rxjava2.X 10————Rxjava源
  2. Android的历史:起源、命名方式
  3. Android(安卓)三级缓存 LruCache缓存机制
  4. Robotium 一款Android自动化测试框架
  5. :Handler方法小结(在线程中更新UI和了解Han
  6. Android(安卓)动画框架详解
  7. Android手机用户隐私获取,包括读取通讯录
  8. Android沉浸式状态栏+图片背景+标题栏渐
  9. Android五大布局特性
  10. Android开发本地及网络Mp3音乐播放器(三)