/**********************************************************************************
* Only the original thread that created a view hierarchy can touch its views.
* 说明:
* 自定义view的时候出现这个错误,是用错了方法。
*
* 2016-6-15 深圳 南山平山村 曽剑锋
*********************************************************************************/
一、参考文档:
Android “Only the original thread that created a view hierarchy can touch its views.”
http://stackoverflow.com/questions/5161951/android-only-the-original-thread-that-created-a-view-hierarchy-can-touch-its-vi
二、解决办法
将线程中调用的 invalidate(); 换成 postInvalidate();