0

I am trying to make a simple recyclerview with image on left and text on right so i gave image width and height of 70dp both and i used png image 1000x1000 exported from illustrator using export for screens(android), but it's showing edgy tried with 512x512 same result also tried putting different resolution in ldpi,hdpi,mdpi,xhdp still same result

without the recyclerview the problem persist

Single row screenshot enter image description here Here's my xml code for single row

 <?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>
Misterrai
  • 77
  • 1
  • 9
  • Possible duplicate of [RecyclerView Recycled ViewHolder Image View wrong size](http://stackoverflow.com/questions/33283493/recyclerview-recycled-viewholder-image-view-wrong-size) – denis_lor Mar 20 '17 at 11:47
  • I also faced the same issue, after downloading 512 X 512 image from http://www.flaticon.com/search?word=calculator%20icon and replacing the original image everything working fine – Bahu Mar 20 '17 at 12:11
  • Thanks everyone i solved by removing every other drawable folder except drawable-ldpi and it works now also i think using very large image was the problem 1000x1000 now its 282x196. – Misterrai Mar 20 '17 at 12:38

0 Answers0