在 android 中的九个补丁图像上使用时,图像视图不显示

问题描述

我使用九个补丁图像 (shadow_15347) 作为阴影的背景,在它上面我使用带有背景或 src 的我的徽标 png 的图像视图。我的九个补丁图像显示,但我的徽标 png 在模拟器上运行时不显示。虽然在活动的设计视图中它显示正确,请提前告诉我我错在哪里谢谢。

    <LinearLayout
        android:layout_width="0dp"
        android:layout_weight="0.2"
        android:layout_height="match_parent"
        android:gravity="center"
        android:background="@drawable/shadow_15347"
        android:orientation="vertical">


        <ImageView
            android:id="@+id/imageView5"
            android:layout_width="300dp"
            android:layout_height="300dp"
            android:background="@drawable/ic_baseline_add" />

    </LinearLayout>

解决方法

在 imageview 为什么使用 android:background 标签来设置你的图片,你可以 src 标签并检查。