图像看起来像在recyclerview中像素化

时间:2017-03-20 11:41:30

标签: android android-layout xml-layout

我正在尝试使用左侧的图像和右侧的文本制作一个简单的recyclerview,因此我给出了图像宽度和高度均为70dp,我使用png图像1000x1000从Illustrator导出使用导出屏幕(android),但它显示了使用512x512尝试的前卫同样的结果也尝试在ldpi,hdpi,mdpi,xhdp中使用不同的分辨率仍然是相同的结果

没有recyclerview问题仍然存在

单排截屏 enter image description here 这是我的单行

的xml代码
 <?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="wrap_content"
        android:orientation="horizontal"
        android:layout_margin="20dp">
        <ImageView
            android:id="@+id/img"
            android:layout_width="70dp"
            android:layout_height="70dp" />
    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="15dp"
        android:layout_marginLeft="15dp">

        <TextView
            android:id="@+id/heading_txt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="20sp"
            android:textStyle="bold"
            android:gravity="start"/>

        <TextView
            android:id="@+id/sub_heading_txt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/heading_txt"
            android:textStyle="normal"
            android:textSize="12sp"
            android:gravity="start"/>
    </RelativeLayout>

    </LinearLayout>

0 个答案:

没有答案