glide icon indicating copy to clipboard operation
glide copied to clipboard

4.8.0 still incorrectly returns a ViewTarget instead of just a Target

Open ParticleCore opened this issue 7 years ago • 2 comments

According to the documentation and the 4.8.0 release notes into should be returning a Target when using an ImageView https://github.com/bumptech/glide/releases/tag/v4.8.0 https://bumptech.github.io/glide/doc/targets.html#cancellation-and-re-use https://bumptech.github.io/glide/javadocs/400/com/bumptech/glide/RequestBuilder.html#into-android.widget.ImageView-

However it is still returning a ViewTarget despite the fact that the Javadoc in the source code itself states that it returns a Target

ss

As a result I cannot use the new version correctly because I am forced to use the deprecated ViewTarget and this keeps throwing the Deprecated warning until it is no longer used.

Is this intentional? If so then the documentation should reflect this behavior otherwise the code should be corrected to reflect the documentation.

ParticleCore avatar Sep 27 '18 10:09 ParticleCore

Looks like I can just use Target directly since ViewTarget extends Target.

ParticleCore avatar Sep 27 '18 10:09 ParticleCore

@sjudd I think this should be reopened. It's still the case. It's really strange to have a deprecated class returned from one of the main APIs:

https://github.com/bumptech/glide/blob/b1c6076bbbc3cc46d45f35924070cb11be44ff90/library/src/main/java/com/bumptech/glide/RequestBuilder.java#L884

https://github.com/bumptech/glide/blob/b1c6076bbbc3cc46d45f35924070cb11be44ff90/library/src/main/java/com/bumptech/glide/request/target/ViewTarget.java#L48-L49

TWiStErRob avatar Oct 03 '23 22:10 TWiStErRob