Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
onTouch(), onClick(),是否runOnUiThread()按顺序在同一个 UI 线程中运行?还是我必须担心它们之间的同步问题?
onTouch()
onClick()
runOnUiThread()
onTouch()、onClick()、runOnUiThread() 是否顺序运行在同一个 UI 线程中?
是的。99.9% 的时间,Android 会在主应用程序线程上调用您的方法。例外情况是:
AsyncTask