android layout images bad quality

左心房为你撑大大i 提交于 2021-02-11 12:46:24

问题


when I add images on layout it show in bad quality

<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" />

how to fix it? (I need to fix it only without programmatically)

thanks


回答1:


i think your images are stretching use the properties for imageview to get full image ..

 android:scaleType="matrix"

Controls how the image should be resized or moved to match the size of this ImageView.




回答2:


Have you compress or changed the format of image? while doing so sometimes images gets distorted. And make sure that, what you want to set in ImageView android:background or android:src ?



来源:https://stackoverflow.com/questions/8193162/android-layout-images-bad-quality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!