title: Android custom listview with space between items
body: <p>How can I make a listview as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/QUawj.png" alt="listview with spaces between each item"></p>
  
  <p>and one more question about row layout, i have such layout </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" &gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="100dp"
          android:background="@drawable/deals_list_row_gradient_background"
          android:orientation="horizontal" &gt;
  
          &lt;ImageView
              android:id="@+id/dealImg"
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:layout_gravity="top"
              android:src="@drawable/test" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="100dp"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/dealDescription"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="5dp"
                  android:layout_marginRight="5dp"
                  android:layout_marginTop="5dp"
                  android:text="Lorem Ipsum dolor sit amet dolor sed a ite amkt Lantin dolor latim dk kuitshen sed iditur anet" /&gt;
  
              &lt;TextView
                  android:id="@+id/smth"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="4dp"
                  android:layout_marginRight="4dp"
                  android:text="...................................................."
                  android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent" &gt;
  
                  &lt;TextView
                      android:id="@+id/dealNewPrice"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentRight="true"
                      android:layout_marginRight="5dp"
                      android:text="1248$"
                      android:textColor="@color/deals_list_new_price"
                      android:textSize="18sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:id="@+id/dealOldPrice"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentBottom="true"
                      android:layout_marginRight="15dp"
                      android:layout_toLeftOf="@+id/dealNewPrice"
                      android:text="2500$"
                      android:textColor="@color/deals_list_old_price"
                      android:textSize="15sp" /&gt;
              &lt;/RelativeLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>but i have trouble with imageview, i dont understand how will be correctly to set its width and height
  also lot of people say me that using RalativeLayout is bad idea</p>