从本地加载图片和drawable加载到布局格式不一样的问题

来源:互联网 发布:python 函数传入列表 编辑:程序博客网 时间:2024/06/05 19:53

今天编写代码遇到一个问题,就是我从本地加载的图片到布局和从drawable加载的图片显示的格式不一样,直接上图吧,哪位大神可以帮忙解决呢?

下图两张都是从本地文件中读的。

下图第一个是从文件中加载的,第二个是从drawable加载的。

下面是每个Item的布局

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:background="#000000"    android:padding="5dp"    android:orientation="vertical">        <ImageView            android:id="@+id/iv_winelist"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:src="@drawable/winlist_item_add" />        <TextView            android:id="@+id/tv_winelist"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:layout_gravity="center"            android:layout_marginTop="5dp"            android:layout_marginBottom="5dp"            android:text="000"            android:textColor="#FFFFFF"            android:textSize="15sp" />    </LinearLayout>


有哪位大神能帮忙解决一下呢?万分感谢。

0 0