您好,我正在使用为 M1 机器创建的模拟器https://github.com/google/android-emulator-m1-preview。我从moviesApi获取海报路径。但是在其他设备中,它们在recyclerview中绘制得很好,当我在我的moto g6中模拟它时,也会发生这个问题。
显示的图像是在 xml 中设置的图像,如下所示。
<ImageView
android:id="@+id/rv_image_movie"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:background="@drawable/movies_noimage"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ImageView>
改造响应是完美的,正如我评论的那样,它适用于其他模拟器 api 26 27 28 任何你命名的。但是在这个和 motog6 中不起作用肯定是有问题。
这很奇怪,因为在 m1 支持的模拟器中,我的 rick and morty 应用程序完美地显示了图像。