title: getFragmentManager from ArrayAdapter
body: <p>I have a listView fulled from my custom ArrayAdapter. In each view there is a button. I want to change the current fragment when the button is clicked. This is my code:</p>
  
  <pre><code>public class CheckInSArrayAdapter extends ArrayAdapter&lt;JSONObject&gt; {
  
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          return getViewOptimize(position, convertView, parent);
      }
  
      public View getViewOptimize(int position, View convertView, ViewGroup parent) {
  
      ......
  
          viewHolder.commentBtn.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
  
              ??? &lt;&lt;&lt;&lt;&lt;
  
          });
  
          return convertView;
      }
  
      private class ViewHolder {
          ...       
          public Button commentBtn;
      }
  
  }
  </code></pre>
  
  <p>So now, i can't invoke getFragmentManager from the OnClickListener. How can i do?</p>