英文:

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:persistentDrawingCache用法说明
  2. Android(安卓)SharedPreferences本地缓存
  3. Android(安卓)图片加载缓存
  4. Android(安卓)侧滑删除功能
  5. Android绘图机制与处理技巧-更新中
  6. Android(安卓)强大的图片加载缓存— Glide
  7. Android(安卓)- 设置带滚动条的TextView
  8. Android(安卓)备忘
  9. ListView滚动条问题

随机推荐

  1. Capacitor+Vue+Vant移动端打包总结
  2. Android使用控件ImageView加载图片的方法
  3. Android Studio Gradle自动打包文档
  4. Android中Service服务详解(一)
  5. Android 滑动效果进阶篇(六)—— 倒影效果
  6. Android自定义UI手势密码改进版源码下载
  7. Android应用开发揭秘(笔记) 第六章 Android
  8. Android集成第三方支付
  9. android 的handler 注意
  10. Could not find SDK_Root\tools\adb.ex