Acc*_*ivo 2 png android imageview
在我的AlertDialog我有一个ImageView的,当我选择来显示android:src="@drawable/logo_small"(一个PNG在每个文件夹/华电国际/ LDPI等..围绕64x64px)一切工作正常.相反,当我告诉android:src="@drawable/logo_big"(它只有一个PNG 1417x1417pixel和593KB的绘制根文件夹)的图像不会出现.
布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageLogoBig"
android:layout_width="30dp"
android:layout_height="30dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/logo_big" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:src="@drawable/gplay_logo" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
imageLogoBig不会显示在上面的示例和下面的示例中:
<ImageView
android:id="@+id/imageLogoBig"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/logo_big" />
Run Code Online (Sandbox Code Playgroud)
当我在写,如果我从绘制的根目录中删除图像logo_big,如果我在绘制,华电国际,绘制,LDPI,绘制,MDPI和绘制,xhdpi复制它,一切工作正常的问题,我刚刚发现.这很奇怪,因为另一个图像:imageView1,只在drawable文件夹中(但是是172x60px)并且显示正确.
为什么会这样?有什么建议?(例如,只将logo_big放在drawable-xhdpi ...中)
| 归档时间: |
|
| 查看次数: |
7572 次 |
| 最近记录: |