解决方案 »
- 突然断电项目中的java文件被毁
- Handler 的postDelayed 这方法的作用是什么?
- android 用传感器测量行走距离
- android悬浮窗是怎么回事的,大神请进的
- android输入不了中文,只能输入日文和英文
- android 怎样使用log16进制格式输出一个字符串的编码?
- ndk编译x86可执行文件在linux中无法运行
- Horizontalscrollview里添加一个布局,该布局里在添加一个自定义的View,为什么View里用Canvas画图无法显示?
- andriod 4.4 连接mysql
- 求大神解决图片四角随意拉伸变形但并不扭曲图形,如何实现?
- 如何在Android Studio里设置Build Tool版本?
- 求个算法~
直接通过一个thread来操作UI控件不报错只是运气建议买本Android开发相关的书籍,比如Pro Android 4
或者多看看android developer网址的guide及training
http://developer.android.com/guide/components/processes-and-threads.html
...
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
http://blog.csdn.net/zhaokaiqiang1992/article/details/43410351