Simple use of Android glide
1.) add reference and add configuration in build.gradle
compile 'com.github.bumptech.glide:glide:3.7.0'
2.) set binding life cycle
We can bind more efficiently using the method provided by glide, which can better dynamically manage the life cycle of the request to load pictures
3.) simple loading of picture instances
Glide.with(this).load(imageUrl).into(imageView);
4.) set pictures in loading and failed loading
You can get familiar with the polymorphic implementation of placeholder() and error() functions in the API
5.) set skip memory cache
Glide.with(this).load(imageUrl).skipMemoryCache(true).into(imageView);
6.) set download priority
Glide.with(this).load(imageUrl).priority(Priority.NORMAL).into(imageView);
7.) set cache policy
8.) set loading animation
9.) set thumbnail support
10.) set the loading size
Glide.with(this).load(imageUrl).override(800,800).into(imageView);
11.) set dynamic conversion
12.) set the content to be loaded
13.) set the listening request interface. The purpose of setting listening can be used to monitor the source of error in the request and whether the image source is memory or disk
14.) set dynamic GIF loading mode
15.) dynamic cleaning of cache
The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. At the same time, I also hope to support a lot of programming tips!