当前位置:网站首页>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);
边栏推荐
- Unity particle special effects series - the poison spray preform is ready, and the unitypackage package can be used directly - next
- Comment obtenir le temps STW du GC (collecteur d'ordures)?
- 双容水箱液位模糊PID控制系统设计与仿真(Matlab/Simulink)
- Applet image height adaptation and setting text line height
- Unity粒子特效系列-毒液喷射预制体做好了,unitypackage包直接用 -下
- 面试:Bitmap像素内存分配在堆内存还是在native中
- QT realizes signal transmission and reception between two windows
- cent7安装Oracle数据库报错
- Advanced opencv:bgr pixel intensity map
- Unity particle special effects series - the poison spray preform is ready, and the unitypackage package is directly used - on
猜你喜欢
单片机原理与接口技术(ESP8266/ESP32)机器人类草稿
RMS TO EAP通过MQTT简单实现
Analysis on the wallet system architecture of Baidu trading platform
(1) Complete the new construction of station in Niagara vykon N4 supervisor 4.8 software
Understand the window query function of tdengine in one article
【 conseils 】 obtenir les valeurs des axes X et y de la fonction cdfplot dans MATLAB
基于单片机步进电机控制器设计(正转反转指示灯挡位)
Roll up, break 35 - year - old Anxiety, animation Demonstration CPU recording Function call Process
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
如何判断线程池已经执行完所有任务了?
随机推荐
Tdengine connector goes online Google Data Studio app store
Uni app running to wechat development tool cannot Preview
90%的人都不懂的泛型,泛型的缺陷和应用场景
QT VT100 parser
oracle和mysql批量Merge对比
Openes version query
MySQL字符类型学习笔记
QT timer realizes dynamic display of pictures
【系统设计】指标监控和告警系统
Single chip microcomputer principle and Interface Technology (esp8266/esp32) machine human draft
Node-RED系列(二九):使用slider与chart节点来实现双折线时间序列图
[C language] the use of dynamic memory development "malloc"
Wechat applet - simple diet recommendation (4)
Design and Simulation of fuzzy PID control system for liquid level of double tank (matlab/simulink)
《微信小程序-基础篇》小程序中的事件与冒泡
Dedecms website building tutorial
Design and exploration of Baidu comment Center
善用兵者,藏于无形,90 分钟深度讲解最佳推广价值作品
程序员如何活成自己喜欢的模样?
Tdengine already supports the industrial Intel edge insight package