Closed mohsenmoqadam closed 3 years ago
it worked:
val parcelFileDescriptor = requireContext().contentResolver.openFileDescriptor(it, "r")
val fileDescriptor: FileDescriptor = parcelFileDescriptor!!.fileDescriptor
val image = BitmapFactory.decodeFileDescriptor(fileDescriptor)
parcelFileDescriptor!!.close()
avatarView.setImageBitmap(image)
AvatarView
does not override setImageURI
, so it shouldn't be any different from a regular ImageView
.
I can't say what was the URI
you were using, or what was the issue that was happening to you in specific. But good to know you got it working.
I'll close the issue now :)
Dears can help me how I change image src programmatically? Suppose
it
isUri
and this:not workπππ