title: AsyncTask - after execution, how to update view?
body: <p>In the onCreate() event of an Activity, I have started an AsyncTask to retrieve Product data from a database. After this has been completed successfully, how can I update the display?</p>
  
  <p>Metacode:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.venueviewbasic);
              (..)
      new GetProductDetails().execute();
  
  class GetProductDetails extends AsyncTask&lt;String, String, String&gt; {
  
      protected String doInBackground(String... params) {
  
          // updating UI from Background Thread
          runOnUiThread(new Runnable() {
              public void run() {
                  // Check for success tag
                  int success;
                  try {
                      // Building Parameters
                      List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
                      params.add(new BasicNameValuePair("id", vid));
          (.. retrieve and parse data and set new textview contents ..)
  </code></pre>
  
  <p>The textviews etc. don't get updated however.</p>