ViewPager中属性android:flipInterval="30" android:persistentDrawingCache="animation"
16lz
2022-05-09
android:flipInterval; flip是替换,翻转;Interval是间隔; 意思就是设置里面每一个View显示的时间;android:persistentDrawingCache; 字面意思就是 持久化绘画缓存;实际就是也是这个意思,下面是别人翻译这局的api定义绘图的高速缓存的持久性。 绘图缓存可能由一个 ViewGroup 在特定情况下为其所有的子类启用,例如在一个滚动的过程中。 此属性可以保留在内存中的缓存后其初始的使用。 坚持缓存会消耗更多的内存,但可能会阻止频繁的垃圾回收是反复创建缓存。 默认情况下持续存在设置为滚动。其属性值只有以下几种:ConstantValueDescriptionnone 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.
更多相关文章
- android中使用线程池和临时缓存优化网络图片加载
- Android缓存浅析
- Android绘图之绘制太极图
- Android常见问题总结(五)
- android绘图Paint.setXfermode()和Canvas.saveLayer()方法的作用
- Android(安卓)WebView实现离线加载功能
- Android(安卓)Bitmap的加载和Cache
- Android大图片导致内存问题小结
- Android(安卓)DiskLruCache完全解析,硬盘缓存的最佳方案