No error calling textView.setText from non UI-Thread. Why?
<p>I wrote the following Code which basically starts a Thread from which the text of a TextView is changed.  </p>

<p>I was expecting an error because I access a TextTiew (UI-element) from another Thread than the main-Thread.  </p>

<p>But it works fine. Thought this shouldn't be possible as far as I know.<br>
I don't get it, what am I missing? </p>

<pre><code>public class MainActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tv = (TextView) findViewById(R.id.view1);
        tv.setText(Thread.currentThread().getName());

        Thread theThread = new Thread(new aRunnable(tv));
        theThread.start();      
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
</code></pre>

<hr>

<pre><code>public class ARunnable implements Runnable{     
    TextView tv;    
    public ARunnable(TextView tv){
        this.tv = tv;
    }   
    @Override
    public void run() {
        tv.setText(tv.getText()+"----" + Thread.currentThread().getName()); 
    }

}
</code></pre>
