title: Android: ListView tells me it's populated but not displaying items
body: <p>So I've googled, and scoured SO for an answer to what I think is probably a ridiculous oversight, but here goes.</p>
  
  <p>I have a <code>ListView</code> that I'm populating with an <code>ArrayAdapter</code> that I'm building out of a list of objects I'm using elsewhere in my application. I have checked via <code>getCount</code> that there are items in the adapter, both before and after I call <code>.setAdapter()</code>.  Nothing is showing up in my application however.</p>
  
  <p>My main layout <code>res/layout/playlistview</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/playlist_screen"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_weight="1"
  android:background="#80000000"
  android:gravity="center"
  android:orientation="horizontal" &gt;
  
  &lt;ListView
      android:id="@+id/playlistview"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:divider="#206"
      android:background="#602" &gt;
  
  &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>(I set the colors so I could see what's going on more easily)</p>
  
  <p>the <code>textview</code> for each item <code>res/layout/singlelistitem</code>:</p>
  
  <pre><code>&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/single_item"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:textSize="16sp"
      android:padding="5dp" 
      android:background="#206"&gt;
  &lt;/TextView&gt;
  </code></pre>
  
  <p>and the code I use to populate it:</p>
  
  <pre><code>private ListView playlistView;
  
  private void buildPlaylistView() {
  playlistView = (ListView)findViewById(R.id.playlistview);
  
  ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.singlelistitem, R.id.single_item, playlist.titlesAsArray());
  
  playlistView.setAdapter(adapter);
  
  playlistView.setVisibility(View.VISIBLE);
  
  adapter.notifyDataSetChanged();
  ((ArrayAdapter&lt;String&gt;)playlistView.getAdapter()).notifyDataSetChanged();
  }
  </code></pre>
  
  <p><code>playlist.titlesAsArray()</code> does return <code>String[]</code> and it works.</p>
  
  <p>I have both of the <code>.notifyDataSetChanged()</code> in there, since I found that on SO and gave it a try.</p>
  
  <p>When I change the <code>android:layout_height</code> in the <code>ListView</code> object in my XML to <code>wrap_content</code>, I see only the opaque background that is in the <code>LinearLayout</code> that wraps it.  When I set the <code>ListView</code> <code>android:layout_height</code> to <code>match_parent</code>, the whole screen is <code>#206</code> (magentish).</p>
  
  <p>When i check <code>getCount()</code> on the adapter before <code>setAdapter()</code> it says there are items.  When I check it after, from the view itself, it says there are the same number of items.  I'm totally lost on this one, but nothing is displayed.</p>