2010-05-09 85 views
2

我正在使用UI的布局xml文件。但图像被压缩,质量在一定程度上已经下降。为什么我的图像被压缩?

我的代码是这样的:

<ImageView 
    android:layout_width="480px" 
    android:layout_height="717px" 
    android:layout_x="0px" 
    android:layout_y="45px" 
    android:scaleType="fitXY" 
    android:src="@drawable/e4" /> 

提拉实际上是480x717

这里有什么问题?这是由于fitXY?

+0

e4是一个PNG文件。 – Johnny 2010-05-09 10:02:40

+0

你确定你的屏幕至少是480x762吗? – RoflcoptrException 2010-05-09 11:46:06

+0

是的,当我删除了fitXY后,问题仍然存在 – Johnny 2010-05-09 11:47:33

回答

0

当然是。

你说你想要一些尺寸,但后来你说你想它的规模。

所以其刻度。

+0

我除去fitXY,但它仍然丢失了一些品质。 Android/ImageView中是否有其他设置可以使图像显示无损? – Johnny 2010-05-09 10:02:24

+0

我不知道,对不起 – 2010-05-09 10:05:29

+0

尝试使用center作为scaleType。请检查下面的链接可用不同scaletypes: http://developer.android.com/reference/android/widget/ImageView.ScaleType.html – Karan 2010-05-09 14:04:43