glide对网络图片 进行底部裁剪

  • Post author:
  • Post category:其他


Glide.with(getContext())
                .asBitmap()
                .load(url)
                .into(new CustomTarget<Bitmap>() {
                    @Override
                    public void onResourceReady(@NonNull @NotNull Bitmap resource, @Nullable @org.jetbrains.annotations.Nullable Transition<? super Bitmap> transition) {
                        Bitmap tempBm = Bitmap.createBitmap(resource, 0, 0, resource.getWidth(), (int) (resource.getHeight() / 1.25));
                        //Handler....
                    }

                    @Override
                    public void onLoadCleared(@Nullable @org.jetbrains.annotations.Nullable Drawable placeholder) {

                    }
                });



版权声明:本文为weixin_45681365原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。