首页 > 其他 > 详细

Only the original thread that created a view hierarchy can touch its views.

时间:2016-06-15 10:37:19      阅读:164      评论:0      收藏:0      [点我收藏+]
/**********************************************************************************
 *  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();

 

Only the original thread that created a view hierarchy can touch its views.

原文:http://www.cnblogs.com/zengjfgit/p/5586492.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!