Android Jpg + png图像显示为白色

时间:2019-02-28 10:29:32

标签: android kotlin androidx

我的一些资源图像显示为白色,我不知道为什么。  -我正在使用可绘制的导入器插件以多种密度导入图像。  -如果我将其设置为背景资源,但无法控制其尺寸,则会显示图像:

  • 使用了srccompatSrc属性,没有任何变化。
  • 试图使用glide加载图像,并且没有任何变化。

xml

   <ImageView
    android:layout_width="match_parent"
    android:layout_height="320dp"
    android:scaleType="centerCrop"
    android:src="@drawable/graphic_map"/>

Expmple png image Layout in xml preview vs in emulator

Example jpg Image Location

0 个答案:

没有答案
相关问题