Summary: * * * * glide load is a very powerful image library, but also recommended by official Google, is also very convenient to use and run-off of worth to learn!
Basic use # # #
# # 1. Import library
` implementation 'com. Making. Bumptech. Glide: glide: 4.9.0' `
Making address: * * * * https://github.com/bumptech/glide
# # 2. Add the Internet permissions
` & lt; USES - permission android: name="android. Permission. INTERNET"/& gt; `
Basic use
# # 3.` Glide. With (this). The load (url) into (imageView); `
# # 4. Extension
Normal placeholder: * * * * in the picture is not loaded when the first display a picture
` `. Placeholder ()
Placeholder figure: * * * * load when something goes wrong, can show a picture, to remind the user
`. Error `
Designated picture size/clipping: * * * * limit image size
`. Override (width, height) `
Thumbnails: * * * * parameter is the float type, is used to specify the show what percentage of the original image, such as 0.2 f, shows that 2% of the original
` `. Thumbnail ()
Animation duration: * * * * parameter is the type int, unit is ms, default duration is 300 ms
` `. CrossFade ()
Close animation: * * * * off animation
` `. DontAnimate ()
Caching mechanism * * * *
` `. DiskCacheStrategy ()
Parameter description: * * * *
- DiskCacheStrategy. NONE: no cache,
- DiskCacheStrategy. DATA: cache artwork,
- DiskCacheStrategy. RESOURCE: cache the transformed images,
- DiskCacheStrategy. ALL: cache artwork and cache the transformed image,
- DiskCacheStrategy. AUTOMATIC: Glide automatically choose caching strategy (the default),
* * load of circular images: * *
`. Apply (RequestOptions. BitmapTransform (new CircleCrop ())) `
Said: after * * * * Glide methods which are frequently used as if only these, ha, ha, ha, yeah! Then it first!
CodePudding user response:
is not supported? How to delete?CodePudding user response:
What you get whatCodePudding user response:
CSDN divides the blog and BBS, but you in the BBS, blog, sa,