【发布时间】:2018-09-21 13:43:24
【问题描述】:
在我的 android 应用程序中,我正在从相机捕获图像并通过滑行加载它。在某些设备中它可以正常工作,但某些设备(如 LG Q6、MI note 4)无法正常加载。请检查我的代码并给出一些解决方案。
在 Kotlin 文件中:
val imageURL = "/storage/emulated/0/Pictures/1537536635333.jpg"
Glide.with(activity!!)
.load(imageURL)
.into(cameraThumbnailIV)
在 XML 文件中:
<ImageView
android:id="@+id/cameraThumbnailIV"
android:layout_width="60dp"
android:layout_height="60dp"
android:scaleType="centerCrop"
android:src="@drawable/photothumbnail" />
【问题讨论】:
-
It doesn't load properly这是什么意思?它根本不加载,应用程序崩溃或部分加载? -
它没有加载。如果我将 .error 与图像放在一起,它将以 .error 方法显示该图像。 @lonut j。贝让
-
检查是否给出了READ_EXTERNAL_STORAGE
标签: android android-imageview android-glide android-image-capture