| | |
| | | import androidx.annotation.Nullable; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.RequestBuilder; |
| | | import com.bumptech.glide.load.DataSource; |
| | | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
| | | import com.bumptech.glide.load.engine.GlideException; |
| | |
| | | .placeholder(placeholder) |
| | | .error(error) |
| | | .into(imageView); |
| | | } |
| | | |
| | | /*** |
| | | * 加载图片 |
| | | */ |
| | | @SuppressLint("CheckResult") |
| | | public static void loadResource(ImageView imageView, int res, boolean isCircle) { |
| | | RequestBuilder<Drawable> load = Glide.with(imageView).load(res); |
| | | if (isCircle) { |
| | | load.apply(new RequestOptions().circleCrop()); |
| | | } |
| | | load.into(imageView); |
| | | } |
| | | |
| | | /*** |
| | |
| | | |
| | | public interface OverImgView{ |
| | | void over(); |
| | | |
| | | void fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | private static void loadBM(Context context, Bitmap bitmap, ImageView imageView, int num){ |
| | |
| | | } |
| | | return chatcricleFoursUserHead; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static void loadBitMap(Context context, String url, ImageView imageView, Integer i,boolean isfit) { |