I am using Fresco Android Library to get images from URLs. The images I get without any problem, but the thing is that the setImageURI(url)
is deprecated.
So I could not find what to use instead. To avoid deprecated functions usage in my code.
You can also use this method: setImageURI(String uriPath)
val uriPath = arrayList!![position].getUrl()
draweeView.setImageURI(uriPath)
setImageUri(uri, callerContext)
–
Quizmaster SimpleDraweeView#setImageURI(Uri)
is actually @undeprecate
d (https://github.com/facebook/fresco/blob/master/drawee/src/main/java/com/facebook/drawee/view/SimpleDraweeView.java#L117) but this command is not a standard JavaDoc command and there is no better way to undeprecate something that has been marked as deprecated in a parent class.
However, you should use SimpleDraweeView#setImageURI(Uri uri, @Nullable Object callerContext)
instead. The caller context can be null or it can be additional metadata (like a String TAG that can be used to better identify where image requests are coming from).
You can also use this method: setImageURI(String uriPath)
val uriPath = arrayList!![position].getUrl()
draweeView.setImageURI(uriPath)
setImageUri(uri, callerContext)
–
Quizmaster © 2022 - 2024 — McMap. All rights reserved.