Glide not loading real image and stuck with placeholder

后端 未结 11 734
长情又很酷
长情又很酷 2021-02-02 05:59

I have a pretty basic load image from server line code:

Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).into(view);
11条回答
  •  余生分开走
    2021-02-02 06:29

    Dont use transition or animation for Glide.It will solve your problem

    Code :

    Glide.with(context)
        .load(horizontalHappyHourList.get(position).getImage())
    //  .transition(DrawableTransitionOptions.withCrossFade(400)) //Optional
        .apply(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.RESOURCE)
        .error(R.drawable.no_image))
        .into(holder.imageView);
    

提交回复
热议问题