2011-11-19 68 views
0

,当我在布局中添加图像它质量不好展示Android的布局图像质量差

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 
<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="@drawable/sbackground" /> 

如何解决呢? (我需要修复它只是没有在程序上)

感谢

+0

“android layout images bad quality”?我认为如果你的观点不是拉伸图像,那么你就不需要改善图像质量,这与观看和图像没有任何关系。 – user370305

+1

当写入“XY看起来不好”时总是包含屏幕截图。我们如何知道在这种情况下“坏”是什么意思,或者甚至给你一个想法如何解决这个问题? – 2011-11-19 09:42:41

+0

没有图像是好质量和大分辨率(640 x 960分辨率) – user1028269

回答

0

我想你的图像拉伸使用属性的ImageView得到充分的图像..

android:scaleType="matrix" 

控制图像应如何调整或移动以匹配此ImageView的大小。

0

你压缩或改变图像的格式?同时这样做有时会使图像变形。并确保你想在ImageView android:backgroundandroid:src中设置什么?

+0

当我使用此选项设置背景位图时,它显示完美 'BitmapFactory.Options options = new BitmapFactory.Options(); \t \t options.inDither = true; \t \t options.inScaled = false; \t \t options.inPreferredConfig = Bitmap.Config.ARGB_8888; \t \t options.inDither = false; \t \t options.inPurgeable = true;' – user1028269

+0

将android:background =“@ drawable/sbackground”更改为android:background =“@ drawable/ic_launcher”或android:background =“@ drawable/icon”,然后尝试是否一切正常,这意味着sbackground不正确。 – Pawan

+0

sbackground是我的图像(sbackground.jpg) – user1028269