title: Calling startActivity() from outside of an Activity context
body: <p>I have implemented a <code>ListView</code> in my Android application.  I bind to this <code>ListView</code> using a custom subclass of the <code>ArrayAdapter</code> class.  Inside the overridden <code>ArrayAdapter.getView(...)</code> method, I assign an <code>OnClickListener</code>.  In the <code>onClick</code> method of the <code>OnClickListener</code>, I want to launch a new activity.  I get the exception:</p>
  
  <pre><code>Calling startActivity() from outside of an Activity  context requires the  
  FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
  </code></pre>
  
  <p>How can I get the <code>Context</code> that the <code>ListView</code>(the current <code>Activity</code>) is working under?</p>