title: ListView and wrap_content
body: <p>I want to create an activity with a ListView on the left and a TextView on the right, side by side. I write the following xml, but the ListView occupies the entire page and it don't worry about the wrap_content. Why? How can I resolve it?</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal" &gt;
  
      &lt;ListView 
          android:id="@+id/lv"
          android:layout_width="wrap_content"
          android:layout_height="match_parent" /&gt;
  
      &lt;TextView 
          android:id="@+id/tv"
          android:layout_width="wrap_content"
          android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>EDIT</strong>: my onCreate</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ListView lv = (ListView) findViewById(R.id.lv);
      String[] values = new String[] { "Test1", "Test2", "Test3", "Test4" };
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,R.layout.left, R.id.tv1, values);
      lv.setAdapter(adapter); 
  }
  </code></pre>