title: How to instantiate a SQLiteOpenHelper Class on a ListFragment?
body: <p>Hi I have a class that extends SQLiteOpenHelper named "KnowledgeBaseHelper".
  I've been using it for a while with my Classes that extends Activity, but then I decided to shift from using ListActivity to ListFragment, the problem is, when I tried to instantiate my class named KnowledgeBaseHelper like this "KnowledgeBaseHelper helper = new KnowledgeBaseHelper(ListActivity.this);" it gives me an error of "The constructor KnowledgeBaseHelper(ListActivity) is undefined"</p>
  
  <p>This usually works when I'm extendsing ListActivity but now I'm stock with this error. Does the instantiation differ from ListActivity and FragmentActivity?</p>
  
  <p>Thanks</p>
  
  <p>Below are my codes</p>
  
  <pre><code>public class ListActivity extends ListFragment {
      ArrayList&lt;String&gt; symptomList;
      String name;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          return inflater.inflate(R.layout.fragment_generalsymptoms, container,
              false);
      }
  
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onActivityCreated(savedInstanceState);
  
          new LoadSymptoms().execute();
      }
  
      class LoadSymptoms extends AsyncTask&lt;String, String, String&gt; {
  
      @Override
      protected String doInBackground(String... params) {
          // TODO Auto-generated method stub
              KnowledgeBaseHelper helper = new KnowledgeBaseHelper(
                  ListActivity.this);
  
              return null;
      }
  }
  </code></pre>
  
  <p>For the SQLiteOpenHelper, I have a very long code and methods so I decided to include only few.</p>
  
  <pre><code>public class KnowledgeBaseHelper extends SQLiteOpenHelper {
  
      private static final int DATABASE_VERSION = 1;
  
      private static final String DATABASE_NAME = "docdroid";
  
      //... I deleted the following lines        
  
      public KnowledgeBaseHelper(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
  
          StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
              .permitAll().build();
          StrictMode.setThreadPolicy(policy);
  
          // Create Clinic Table
          createTable(db, TABLE_CLINIC, CLINIC_COLUMN);
          //... I deleted the following lines
      }
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          // Drop older table if existed
      db.execSQL("DROP TABLE IF EXISTS " + TABLE_CLINIC);
          onCreate(db);
          //... I deleted the following lines
      }
  }
  </code></pre>
  
  <p>Is there other way to instantiate the class that extends SQLiteOpenHelper in Fragments?</p>