Question: Are fragments running on a separate thread than the activity they were created on?

So let's say I have a fragment that calls a web-service synchronously, does it also block my main activity while retrieving data from the server?

Answer: 
I would assume they're on the UI thread, since Android makes such a big deal keeping UI actions on the UI thread. When calling `commit()`, those transactions are definitely performed on the UI thread, as [stated in the documentation](http://developer.android.com/guide/topics/fundamentals/fragments.html#Transactions).

Seems like you could test it pretty easily with

```
Log.d("Fragment", "thread = " + Thread.currentThread().getName());

```

If it's on thread 'main', then it's on the UI thread.
As stated [here](http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html) Android UI is not thread safe and so Fragments run in the same main thread as an Activity. As such it's better to move your web-service call into an AsyncTask ar else you are at risk of freezing application.