title: Android: ClassCastException when adding a header view to ExpandableListView
body: <p>I'm trying to add a header to an ExpandableListView like so:</p>
  
  <pre><code>headerView = View.inflate(this, R.layout.header, null);
  expandableListView.addHeaderView(headerView);
  expandableListView.setAdapter(new SectionedAdapter(this));
  </code></pre>
  
  <p>Which gives me the following error:</p>
  
  <pre><code> 12-08 16:23:42.354:
   ERROR/AndroidRuntime(421): Caused by:java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams
   12-08 16:23:42.354:   ERROR/AndroidRuntime(421): at android.widget.ListView.clearRecycledState(ListView.java:504)
   12-08 16:23:42.354: ERROR/AndroidRuntime(421): at android.widget.ListView.resetList(ListView.java:490)
   12-08 16:23:42.354:ERROR/AndroidRuntime(421):at android.widget.ListView.setAdapter(ListView.java:422)
   12-08 16:23:42.354:ERROR/AndroidRuntime(421): at android.widget.ExpandableListView.setAdapter(ExpandableListView.java:475)
  </code></pre>
  
  <p>This is happening at the call to <code>expandableListView.setAdapter(new SectionedAdapter(this))</code>, but I can't figure out why. Any ideas?</p>