当前位置:网站首页>Glide advanced level
Glide advanced level
2022-07-05 10:11:00 【asahi_ xin】
cache
- skipMemoryCache(true/false) Whether to skip memory cache .
skipMemoryCache That means Glide Will not put pictures into memory cache . The default is false, So you don't need to call .
Glide.with(this)
.load(" Address ")
.skipMemoryCache(true)
.into(imageView);
When skipping memory cache ,Glide Disk cache will still be used to avoid repeated network requests .
Glide Not only the original image is cached , It also caches full resolution images and other small versions of images . such as , If an image you request is 1000x1000 Pixel , But yours. ImageView yes 500x500 Pixel ,Glide These two sizes will be cached .
If a picture has the same URL, But changes are fast , You may want to disable even disk caching .
- diskCacheStrategy Skip disk cache , Take enumeration as a parameter , The parameters are as follows .
| Parameters | Meaning |
|---|---|
| DiskCacheStrategy.NONE | Don't cache |
| DiskCacheStrategy.SOURCE | Just cache the original full resolution image |
| DiskCacheStrategy.RESULT | Only the final image is cached |
| DiskCacheStrategy.ALL | Cache all versions of images ( Default ) |
Glide.with(this)
.load(" Address ")
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.into(imageView);
Request priority
We often have this need , A screen , To request multiple pictures at the same time , But pictures have priority .Glide There is a treatment in this regard .
- priority Priority of image loading . Method parameters are also enumeration types .
- Priority.LOW
- Priority.NORMAL
- Priority.HIGH
- Priority.IMMEDIATE
Glide.with(this)
.load(" Address ")
.priority(Priority.HIGH)
.into(imageView);
边栏推荐
- 把欧拉的创新带向世界 SUSE 要做那个引路人
- @JsonAdapter注解使用
- [technical live broadcast] how to rewrite tdengine code from 0 to 1 with vscode
- Is it really reliable for AI to make complex decisions for enterprises? Participate in the live broadcast, Dr. Stanford to share his choice | qubit · viewpoint
- 自动化规范检查软件如何发展而来?
- Apache DolphinScheduler 入门(一篇就够了)
- 【系统设计】指标监控和告警系统
- ThreadLocal source code learning
- Single chip microcomputer principle and Interface Technology (esp8266/esp32) machine human draft
- Tdengine can read and write through dataX, a data synchronization tool
猜你喜欢

cent7安装Oracle数据库报错

Fluent generates icon prompt logo widget

如何获取GC(垃圾回收器)的STW(暂停)时间?

Mysql80 service does not start

Tdengine already supports the industrial Intel edge insight package

How Windows bat script automatically executes sqlcipher command

Unity粒子特效系列-毒液喷射预制体做好了,unitypackage包直接用 - 上

字节跳动面试官:一张图片占据的内存大小是如何计算

让AI替企业做复杂决策真的靠谱吗?参与直播,斯坦福博士来分享他的选择|量子位·视点...

Design and Simulation of fuzzy PID control system for liquid level of double tank (matlab/simulink)
随机推荐
Unity particle special effects series - the poison spray preform is ready, and the unitypackage package can be used directly - next
卷起來,突破35歲焦慮,動畫演示CPU記錄函數調用過程
天龙八部TLBB系列 - 关于技能冷却和攻击范围数量的问题
Wechat applet - simple diet recommendation (3)
Z-blog template installation and use tutorial
The writing speed is increased by dozens of times, and the application of tdengine in tostar intelligent factory solution
双容水箱液位模糊PID控制系统设计与仿真(Matlab/Simulink)
A high density 256 channel electrode cap for dry EEG
基于单片机步进电机控制器设计(正转反转指示灯挡位)
天龙八部TLBB系列 - 关于包裹掉落的物品
一种用于干式脑电图的高密度256通道电极帽
Uni app running to wechat development tool cannot Preview
Cut off 20% of Imagenet data volume, and the performance of the model will not decline! Meta Stanford et al. Proposed a new method, using knowledge distillation to slim down the data set
Mobile heterogeneous computing technology GPU OpenCL programming (Advanced)
Charm of code language
The king of pirated Dall · e? 50000 images per day, crowded hugging face server, and openai ordered to change its name
ThreadLocal source code learning
How to correctly evaluate video image quality
Click the picture in the mobile browser and the picture will not pop up
Swift saves an array of class objects with userdefaults and nssecurecoding