tags:

views:

43

answers:

1

Are onTouch(), onClick(), runOnUiThread() running in the same UI thread sequentially? Or do I have to worry about synchronization issue among them?

Thanks.

+1  A: 

Are onTouch(), onClick(), runOnUiThread() running in the same UI thread sequentially?

Yes. 99.9% of the time, Android will be calling into your methods on the main application thread. The exceptions are:

  • where you are expressly telling it to use a background thread via AsyncTask
  • if you expose an interface via AIDL to third-party apps
CommonsWare