Glide实现加载图片进度监听


        Glide.with(this)
                .load(url)
                .fitCenter()
                .listener(new RequestListener() {

                    @Override
                    public boolean onException(Exception arg0, Object arg1,
                                               Target arg2, boolean arg3) {
                       //加载图片出错
                        return false;
                    }

                    @Override
                    public boolean onResourceReady(Object arg0, Object arg1,
                                                   Target arg2, boolean arg3, boolean arg4) {
                      //加载图片成功
                        return false;
                    }
                })
                .into(imageview);

你可能感兴趣的:(安卓开发)