Glide not loading real image and stuck with placeholder

后端 未结 11 1020
长情又很酷
长情又很酷 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:20

    None of the solutions above worked for me. The issue may be at the placeholder you're using. If the view you're using to load the image has a placeholder, it causes some issues. Removing that placeholder for some reason seems to fix it.

    So, if the (Image)View you're trying to inflate has a placeholder, such as android:src="@mipmap/placeholder", remove it.

            
    

    like this

     
    

    It worked for me.

提交回复
热议问题