SimpleDraweeView not showing video thumbnails
- Dominant language
- Kotlin
- Stars
- 17.2k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
I'm developing a gallery app for Android devices. I create a private encrypted field for users to hide their media. I use SimpleDraweeView in the whole project to display the images on the screen. I do not do anything extra to view the hidden media. In this case, the thumbnails of the videos are not displayed when the images are displayed. Although both types are the same as the extension, ImageRequestBuilder can not show video thumbnails. My code;
@JvmStatic
@BindingAdapter("app:newImagePath", "spanCount")
fun newImagePath(imageView: SimpleDraweeView, newImagePath: String, spanCount: Int) {
if (newImagePath.isNotEmpty()) {
val screenWidthSize = imageView.context.windowManager.defaultDisplay.width
val spanPixel = screenWidthSize / spanCount
val uri = Uri.fromFile(File(newImagePath))
val request = ImageRequestBuilder.newBuilderWithSource(uri)
.setResizeOptions(ResizeOptions(spanPixel, spanPixel))
.build()
imageView.setImageRequest(request)
} else
imageView.setImageBitmap(null)
}

Contributor guide
Assessment
This issue has not been assessed yet.