Skip to content

error(R.drawable.xxxx) and placeholder(R.drawable.xxxx) do not work in glide #5404

Open
@dunkindonass

Description

@dunkindonass

Glide Version: 4.11.0

Integration libraries:

Device/Android Version: any devices

Issue details / Repro steps / Use case background:
I am using Glide in dfm and save the image in the drawble folder so that an error image is displayed when the image load fails as shown below.

 Glide.with(binding.root.context)
  .load("url")
  .error(R.drawable.xxxxx)
  .into(binding.icon)

If the resource id value of R.drawable.xxxxx is a negative integer, it will not operate. If it is a positive integer, it will operate normally.

 public T error(@DrawableRes int resourceId)

Are you separately checking the validity of the errorId value saved in the above function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions