title: android asynctask edittext
body: <p>I  have a piece of code that querys my webserver xml parses the data that comes back and fills textfields on my GUi with the relevant data.  Before i had this within my oncreate function and the code worked fine.  However i wanted to show a loading dialogue to the user so i moved the web server and xml parsing operatons to an asynctask.  The problem rises now when i go to populate my GUI text fields with my parsed data and i get an error thrown.  Can anyone see what i am  doing wrong</p>
  
  <pre><code>new BackgroundAsyncTask().execute();   /// called from the oncreate function
  </code></pre>
  
  <p>and my background task code is as follows</p>
  
  <pre><code>  public class BackgroundAsyncTask extends
  AsyncTask&lt;Void, Integer, Void&gt; {
  int myProgress;
  
  @Override
  protected void onPostExecute(Void result) {
  MyDialog.dismiss();
  }
  
  @Override
  protected void onPreExecute() {
   MyDialog = ProgressDialog.show(attraction_more_info.this, " " , " Loading. Please wait ... ", true);
  
  }
  
  @Override
  protected Void doInBackground(Void... params) {
  
                xml query and parse stuff on here ...
  
  
      // Populate page now
  
      TextView titlefield = (TextView) findViewById(R.id.att_title);
      TextView add1field = (TextView) findViewById(R.id.att_address1);
      TextView add2field = (TextView) findViewById(R.id.att_address2);
      TextView townfield = (TextView) findViewById(R.id.att_town);
      TextView postcodefield = (TextView) findViewById(R.id.att_postcode);
       TextView phonefield = (TextView) findViewById(R.id.att_phone);
       WebView webview = (WebView) findViewById(R.id.webview1);
  
                MY ERRORS START HERE
      titlefield.setText(attraction_name);
      add1field.setText(attraction_address1);
      add2field.setText(attraction_address2);
      townfield.setText(attraction_town);
      postcodefield.setText(attraction_postcode);
      phonefield.setText(attraction_phone);
      webview.loadData(attraction_description, "text/html", null);
  
  return null;
  }
  
  @Override
  protected void onProgressUpdate(Integer... values) {
  }
  
  }
  </code></pre>
  
  <p>Can anyone help me out?  </p>