title: How to edit views when waiting for a thread?
body: <p>I load my articles from my wordpress webpage. And want to display them in my app.
  In order to be allowed to wait for a internet response I had to create a Thread.
  Using this method:</p>
  
  <pre><code>private void loadArticles(final String url) {
      Thread thread = new Thread(new Runnable(){
          @Override
          public void run() {
              try {
                  //Get my data and run createArticles();
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      });
  
      thread.start();
  }
  </code></pre>
  
  <p>Then in the createArticles function I try to use my function addViewToParent(...) and I get an error that says:</p>
  
  <blockquote>
    <p>Only the original thread that created a view hierarchy can touch its
    views.</p>
  </blockquote>
  
  <p>How can i work around this problem?</p>
  
  <p>EDIT: I use these networking functions if it matters...</p>
  
  <pre><code>//Connect to the url
  URL pageURL = new URL(url);
  HttpURLConnection connection = (HttpURLConnection) pageURL.openConnection();
  BufferedReader in = new BufferedReader(
       new InputStreamReader(connection.getInputStream())
  );
  </code></pre>