How to create custom item for ListView
<p>I have made custom .xml layout for ListView. Now it looks:</p>

<p><img src="http://i.stack.imgur.com/gXt9I.png" alt="Current state"></p>

<p>But it isn't good, because I have fixed width of layout (250px):</p>

<pre><code>   &lt;LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="250px"&gt;
            &lt;ImageView
                android:background="#FFFFFF"
                android:layout_marginLeft="20px"
                android:layout_marginTop="25px" 
                android:layout_height="100px" 
                android:layout_width="100px" 
                android:id="@+id/imageView1" /&gt;
            &lt;LinearLayout 
                android:id="@+id/linearLayout2" 
                android:layout_height="fill_parent" 
                android:layout_width="fill_parent" 
                android:orientation="vertical"&gt;
                &lt;TextView
                    android:layout_marginTop="20px"
                    android:textStyle="bold"
                    android:textColor="#FF8C00" 
                    android:layout_marginLeft="20px"  
                    android:textAppearance="?android:attr/textAppearanceSmall" 
                    android:id="@+id/textViewFilmName" 
                    android:layout_width="wrap_content" 
                    android:text="TextView" 
                    android:layout_height="wrap_content" /&gt;
                &lt;LinearLayout 
                    android:id="@+id/linearLayout1" 
                    android:layout_height="wrap_content"
                    android:orientation="horizontal" 
                    android:layout_width="fill_parent"&gt;
                    &lt;TextView 
                        android:textAppearance="?android:attr/textAppearanceSmall" 
                        android:id="@+id/textView1" 
                        android:layout_width="wrap_content" 
                        android:text="Director:"
                        android:textStyle="bold" 
                        android:textColor="#FFFFFF" 
                        android:layout_marginLeft="20px" 
                        android:layout_marginTop="10px" 
                        android:layout_height="wrap_content" /&gt;
                    &lt;TextView 
                        android:textAppearance="?android:attr/textAppearanceSmall" 
                        android:id="@+id/textViewDirector" 
                        android:layout_width="wrap_content"
                        android:layout_marginLeft="2px" 
                        android:text="TextView" 
                        android:layout_marginTop="10px" 
                        android:layout_height="wrap_content" /&gt;
                &lt;/LinearLayout&gt;
                &lt;LinearLayout 
                    android:id="@+id/linearLayout3" 
                    android:layout_height="wrap_content" 
                    android:layout_width="fill_parent"&gt;
                    &lt;TextView 
                        android:textAppearance="?android:attr/textAppearanceSmall" 
                        android:id="@+id/textView2"
                        android:layout_marginTop="10px"
                        android:layout_marginLeft="20px"  
                        android:layout_width="wrap_content" 
                        android:text="Stars:"
                        android:textStyle="bold" 
                        android:textColor="#FFFFFF"  
                        android:layout_height="wrap_content" /&gt;
                    &lt;TextView 
                        android:textAppearance="?android:attr/textAppearanceSmall" 
                        android:id="@+id/textViewStart" 
                        android:layout_width="wrap_content" 
                        android:text="TextView"
                        android:layout_marginLeft="2px"  
                        android:layout_marginTop="10px" 
                        android:layout_height="wrap_content" /&gt;
                &lt;/LinearLayout&gt;
            &lt;/LinearLayout&gt;  
    &lt;/LinearLayout&gt;
</code></pre>

<p>If I don't set fixed size for root layout, that I have got similar:</p>

<p><img src="http://i.stack.imgur.com/Rn85Y.jpg" alt="Bad state"></p>

<p>Code for this like previous example, but "250px" have been changed on "fill_layout". How can I set non-fixed size for element, that he will be shown correctly and will fill all row? Thank you</p>
