Note that there are some explanatory texts on larger screens.

plurals
  1. POPrevent Image stretch
    text
    copied!<p>I just created a custom list view. In my custom cell layout I just put a background image to relative layout but images are stretched. Should I create a new image with low density and put it in ldpi folder?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;LinearLayout android:id="@+id/ll_detail" android:layout_width="fill_parent" android:layout_height="55dip" android:src="@drawable/cell_background" android:orientation="horizontal" &gt; &lt;LinearLayout android:layout_width="190dp" android:layout_height="match_parent" android:layout_weight="2.45" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/detail_sec_area_insepected_textview" android:layout_width="180dp" android:layout_marginLeft="10dp" android:layout_height="match_parent" android:ellipsize="end" android:gravity="center_vertical" android:singleLine="false" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@android:color/darker_gray" android:textSize="15sp" /&gt; &lt;/LinearLayout&gt; &lt;ImageView android:id="@+id/select_trip_breakline2" android:layout_width="10dip" android:layout_height="55dip" android:layout_marginLeft="0dip" android:layout_marginTop="2dip" android:layout_weight="1" android:src="@drawable/crosshair_ui_table_cell_breakline_row" /&gt; &lt;ImageButton android:id="@+id/camera_icon" android:layout_width="40dip" android:layout_height="25dip" android:layout_marginLeft="15dip" android:layout_marginTop="20dip" android:layout_weight="1" android:background="@null" android:src="@null" android:visibility="invisible" /&gt; &lt;ImageButton android:id="@+id/circuleforlistview" android:layout_width="40dip" android:layout_height="40dip" android:layout_marginRight="25dip" android:layout_marginTop="10dip" android:layout_weight="1" android:background="@null" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload