Personal blog portal

Load the image code

Glide.with(activity).load(url).into(imageView);
Copy the code

Ii. Flow chart

  1. Glide. With method to create a RequestManager instance
  2. Requestmanager.load method, create GenericRequestBuilder instance, and package codec/decode, transcoding, graphics conversion, download, etc

Decode: File, InputStream convert to Bitmap, Drawable encode: write data to cache

  1. GenericRequestBuilder into method, using the parameters of the load to build to build a Request instances
  2. Request instance, perform download, decode, graphic transformation, data transcoding, generate Resource image resources
  3. The onSourceReady method calls back the processed Resource to Target and displays it

The post exceeded the length limit, please go to the personal blog portal