title: updating ListView from AsyncTask
body: <p>I have two classes,HomeActivity and CustomListAdapter.THe HomeActivity class extends an activity and then updates a listview.I am populating the data to the listview using a CustomListAdapter class which extends BaseAsapter.Everything is working fine but i want to load the data in a background task.When i do that,an error comes up.
  Here is my implementation of the onPostExecute of the AyncTask class. </p>
  
  <pre><code>@Override
      protected void onPostExecute(HomeActivity Params){
          progressDialog.dismiss();
          runOnUiThread(new Runnable(){
              public void run(){
                  final ListView lv1 = (ListView) findViewById(R.id.listings);
                  lv1.setAdapter(new CustomListAdapter(this, shares));
              }
          });
  
      }
  </code></pre>
  
  <p>I get an error telling me that i should change the constructor on CustomListAdapter.But when i change it,everything goes downhill.
  I have tried this unsuccessfully too</p>
  
  <pre><code>final ListView lv1 = (ListView) findViewById(R.id.listings);
          lv1.setAdapter(new CustomListAdapter(this, shares)); 
  </code></pre>
  
  <p>shares is an arraylist of data from the web service.
  Here is the constructor in the CustomListAdapter class</p>
  
  <pre><code> public CustomListAdapter(Context context, ArrayList listData) {
      this.listData = listData;
      layoutInflater = LayoutInflater.from(context);
  }
  </code></pre>
  
  <p>How can go about it?Help will be highly appreciated.</p>