-
public final class GlideKtxKt
-
-
Method Summary
Modifier and Type Method Description final static Objectglide(ImageView $self, Object imageResource, Boolean skipMemoryCache, Boolean circleCrop, Float borderWidth, Integer borderColor, Integer cornerRadius, Priority priority, Boolean dontAnimate, @DrawableRes() Integer placeholder, @DrawableRes() Integer error)使用Glide库加载图片到ImageView,并提供一系列自定义选项。 这个扩展函数支持多种图片资源类型,包括资源ID、URL字符串、Bitmap和Drawable对象。 同时,提供了内存缓存跳过、占位图、错误图、加载优先级、圆角和边框等高级功能。 -
-
Method Detail
-
glide
final static Object glide(ImageView $self, Object imageResource, Boolean skipMemoryCache, Boolean circleCrop, Float borderWidth, Integer borderColor, Integer cornerRadius, Priority priority, Boolean dontAnimate, @DrawableRes() Integer placeholder, @DrawableRes() Integer error)
使用Glide库加载图片到ImageView,并提供一系列自定义选项。 这个扩展函数支持多种图片资源类型,包括资源ID、URL字符串、Bitmap和Drawable对象。 同时,提供了内存缓存跳过、占位图、错误图、加载优先级、圆角和边框等高级功能。
- Parameters:
imageResource- 要加载的图片资源,可以是资源ID、URL、Bitmap或Drawable。skipMemoryCache- 是否跳过内存缓存,默认为true。circleCrop- 是否将图片裁剪为圆形,默认为false。borderWidth- 边框宽度,默认为0F。borderColor- 边框颜色,默认为Color.cornerRadius- 圆角半径,默认为0。priority- 加载优先级,默认为Priority.placeholder- 加载过程中显示的占位图资源ID,默认为R.drawable.error- 加载失败时显示的错误图资源ID,默认为R.drawable.
-
-
-
-