Handler Runnable Scheduling
<p>How does Android schedule code that is run on the main thread's Looper vs code that is run on the main thread itself? See the following example --</p>

<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    final TextView tv = (TextView) findViewById(R.id.tv);
    Handler handler = new Handler();
    handler.post(new Runnable() {
        @Override
        public void run() {
            tv.setText("HELLO");
            tv.setText("WORLD");
        }
    });

    tv.setText("FOO");
    tv.setText("BAR");
}
</code></pre>

<p>I'm a bit confused because AFAIK both segments of code are run on the same thread (the UI thread). Is it possible for Android to interleave code that is running on the main thread's Looper with code that is running on the main thread itself? (For example: can a situation occur where the TextView says "HELLO" then "FOO" then "WORLD" then "BAR"?)</p>

<p>Does code I run directly on the UI thread somehow automatically get added to the main thread's Looper?</p>
