title: Android ListView addHeaderView not working with a simple View
body: <p>I'm inflating a <code>View</code> and adding it to a <code>ListView</code> for using it as a padding for the top element within the <code>ListView</code>. The problem is that the view doesn't render in the <code>ListView</code> unless I change <code>View</code> to for example <code>TextView</code>, cannot I use a simple <code>View</code> here? why?</p>
  
  <p>This is the code for adding the pad:</p>
  
  <pre><code>LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  view top_pad = inflater.inflate(R.layout.search_pad, null);
  list.addHeaderView(top_pad);
  </code></pre>
  
  <p>The pad XML file <strong>layout.search_pad</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;View 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="match_parent"
      android:layout_height="5dp"
      android:background="#333" /&gt;
  </code></pre>