title: Parameters on Runnable
body: <p>I'm trying to pass the "entityFinal" to the <strong>run()</strong> method but since it's a runnable i can't have any parameters.</p>
  
  <p>The "responseView.setText" on the <strong>runOnUiThread</strong> is commented because my android studio is always printing that my responseView is null, and i can't see why it is, since i'm using the View on the xml correctly.</p>
  
  <p>Could someone give me a hint here? i tested a lot things, asyncTask, multi threads, but this is the only way that i had this "almost" working.</p>
  
  <p>Thank you on advance.</p>
  
  <p><strong>xml :</strong></p>
  
  <pre><code>  &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:text="@string/Blank"
              android:id="@+id/textView"
              android:layout_below="@+id/button2"
              android:layout_alignLeft="@+id/button2"
              android:layout_alignStart="@+id/button2"
              android:layout_marginTop="50dp"/&gt;
  </code></pre>
  
  <p><strong>Java file code :</strong> </p>
  
  <pre><code> final TextView responseView = (TextView) activity.findViewById(R.id.textView);
                     new Thread(){
                         public void run(){
                             try{
                               HttpResponse httpResponse = httpclient.execute(httppost);
                               final HttpEntity entity = httpResponse.getEntity();
                               final String entityFinal = entity.getContent().toString();
                             }catch(IOException e){
                                 System.out.println(e.getMessage());
                             }
                             activity.runOnUiThread(new Runnable() {
                                 @Override
                                 public void run() {
                                     //responseView.setText(entityFinal);
                                     System.out.println(responseView);
                                 }
                             });
                         }
                     }.start();
  </code></pre>