executing runOnUiThread on a seperate class.
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7860384/android-how-to-runonuithread-in-other-class">Android how to runOnUiThread in other class?</a>  </p>
</blockquote>



<p>My Asyn Classes are a separate class file. </p>

<pre><code>public class AdamTask extends AsyncTask&lt;String, Void, String&gt;{
         public void showToast(final String toast)
        {
            runOnUiThread(new Runnable() {
                public void run()
                {
                    Toast.makeText(context, toast, Toast.LENGTH_SHORT).show();
                }
            });
        }
}
</code></pre>

<p>How would i execute this method in my AsyncTask Class. I am getting an error The method <code>runOnUiThread(new Runnable(){}) is undefined for the type AdamTask</code></p>

<p>new AdamTask(Eve.this, <code>How to pass the eve activity here</code>).execute();</p>
