update ui in thread
<p>I create a class and extend it from view. also implemented the Runnable interface. In the onTouchEvent i call: <code>new Thread(this).start()</code>.<br>
This is my class:</p>

<pre><code>public class test extend View interface Runnable{

    ----some code------

    public void onTouchEvent(MotionEvent event){
        ----somecode------
        new thread(this).start();
        ----somecode------
    }

    public void run(){
        -----somecode-------
        invalidate();
        -----somecode-------
    }
}
</code></pre>

<p>but i receive this error:</p>

<blockquote>
  <p>only the original thread that created a view hierarchy can touch its views</p>
</blockquote>

<p>How can i fix this?</p>
