Learning based on Glide4.10.0

Implementation 'com. Making. Bumptech. Glide: glide: 4.10.0' annotationProcessor 'com. Making. Bumptech. Glide: the compiler: 4.10.0'Copy the code

Glide. With (context).load(URL).into(imageview)

1. What does Glide do with(context)

1. GetRetriever (activity). The get RequestManager (activity)

2. Call checkAndInitializeGlide (context, annotationGeneratedModule) test and start the initialization

3. Call initializeGlide(Context, generatedAppGlideModule); Glidebuilder. build(applicationContext) is used to initialize Glide

Glide initialization creates various thread pools, various cache objects, and initializes Engine objects.

5. Call RequestManagerRetriever. Get (activity) return RequestManager object, At the same time, through the participation of the activity. GetSupportFragmentManager FragmentManager object (). Call supportFragmentGet (activity, FM, null, isActivityVisible (activity) create RequestManager associated with SupportRequestManagerFragment and do