Android use of glide (Gaussian blur, load monitor, rounded image)
Gaussian blur, load monitor and fillet images are familiar to everyone. Please refer to this article to learn how to achieve these effects.
1. Quote
compile 'com.github.bumptech.glide:glide:3.7.0'
2. Load picture
2.1 basic loading
Glide.with(context) .load(url) .into(imageView);
2.2 setting loading and loading failure
2.3 loading animation only
2.4 add the effect of picture fade loading
2.5 loading Gaussian blur map
2.6 loading listener requestlistener
Note: if you need to set the picture transparency to 0 after loading, you can't set. Placeholder (r.drawable. URL), otherwise you won't achieve the effect you want.
2.7 picture caching mechanism
Glide cache policy
Glide enables disk cache and memory cache by default. Of course, you can also set specific cache policies for a single picture. Set the picture not to be added to the memory cache
Set pictures not to be added to disk cache
Glide supports a variety of disk caching strategies:
Diskcachestrategy.none: do not cache pictures diskcachestrategy.source: cache picture source file diskcachestrategy.result: cache modified pictures diskcachestrategy.all: cache all pictures, default
2.8 loading fillet images
use:
3. Reference
https://www.oudahe.com/p/27261/
https://www.oudahe.com/p/27261/
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.