title: How to call notifyDataSetChanged() from a generic Adapter
body: <p>An <code>OnItemClickListener</code> for a <code>ListView</code> has the following method:</p>
  
  <pre><code>@Override
  public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id)
  </code></pre>
  
  <p>I'd like to have the adapter behind the <code>ListView</code> refresh, and I believe this is done through the use of:</p>
  
  <pre><code>BaseAdapter.notifyDataSetChanged()
  </code></pre>
  
  <p>How do I use the <code>parent</code> parameter in the <code>onItemClick</code> method to do this? So far I've tried:</p>
  
  <pre><code>parent.getAdapter().notifyDataSetChanged();
  </code></pre>
  
  <p>This throws an error because the object returned is of class <code>HeaderViewListAdapter</code>, which for reasons unknown isn't a subclass of <code>BaseAdapter</code>.</p>