title: AsyncTask and the setContentView
body: <p>I have this code for managing some countrys on my database;</p>
  
  <pre><code>class checkCountryAsync extends AsyncTask&lt;String, String, String&gt; {
  
      @Override
      protected void onPreExecute() {
         super.onPreExecute();
         setContentView(R.layout.main);
  
      }
      @Override
      protected String doInBackground(String... aurl) {
          MDPIActivity.this.runOnUiThread(new Runnable() {
  
              public void run() {
                    CountryTable country = new CountryTable() ;
                    country.EnterCountry();
              }
          });
          return null;
      }
  }
  </code></pre>
  
  <p>With this, I would like to set the content View and then in background, that the method onBackground works, but I have still to wait for the content view until the onBackground method is not finished.</p>
  
  <p>Thank you.</p>