bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.64k stars 6.12k forks source link

4.8.0 still incorrectly returns a ViewTarget instead of just a Target #3332

Open ParticleCore opened 6 years ago

ParticleCore commented 6 years ago

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 commented 6 years ago

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

TWiStErRob commented 1 year ago

@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