title: android.view.ViewRootImpl$CalledFromWrongThreadException : Only the original thread that created a view hierarchy can touch its views
body: <p>I'm developing an Android application and I'm using Eclipse as IDE and my database is     MySQL. I have the follow problem. When I try to take datas from the database through the AsynTask I have the error that I show below.</p>
  
  <pre><code>android.view.ViewRootImpl$CalledFromWrongThreadException:
  Only the original thread that created a view hierarchy 
  can touch its views
  </code></pre>
  
  <p>Activity:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     asyn=new MyAsyncTask();
  
     tvtexto=(TextView)findViewById(R.id.tvtextoMa);
     context = getApplicationContext();
     eventos = new ArrayList&lt;Eventos&gt;();
     eventosAdapter = new EventosAdapter(context, R.layout.filae, eventos);
     eventos=new ArrayList&lt;Eventos&gt;();
     asyn.execute();
     listView = (ListView)findViewById(R.id.ListView01Ma);
  }
  </code></pre>
  
  <p>AsyncTask:</p>
  
  <pre><code>public class MyAsyncTask extends AsyncTask&lt;Void, Void, Void&gt; 
  {
     @Override
     protected Void doInBackground(Void... arg0) 
     {
        eventos=(ArrayList&lt;Eventos&gt;) BDEventos.getDatosEventos();
        for(Eventos n:eventos){
           eventosAdapter.add(n);
        }
        eventosAdapter.notifyDataSetChanged();
        listView.setAdapter(eventosAdapter);
        return null;
     }
  }
  </code></pre>