当前位置:   article > 正文

Android的UI组件不是线程安全的,不应该在worker线程操纵UI_worker线程不支持ui操作

worker线程不支持ui操作

Additionally, the Andoid UI toolkit is not thread-safe. So, you must not manipulate your UI from a worker thread—you must do all manipulation to your user interface from the UI thread. Thus, there are simply two rules to Android's single thread model:

  1. Do not block the UI thread
  2. Do not access the Android UI toolkit from outside the UI thread

UI组件不是线程安全的,所以不应该在worker线程操纵UI。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/868093
推荐阅读
相关标签
  

闽ICP备14008679号