码迷,mamicode.com
首页 >  
搜索关键字:在timer中更新ui    ( 1个结果
Android开之在非UI线程中更新UI
当在非UI线程中更新UI(程序界面)时会出现如下图所示的异常: Only the original thread that created a view hierarchy can touch its views. 那如何才能在非UI线程中更细UI呢? 方法有很多种,在这里主要介绍两种: 第一种:在需要更新UI的代码行后加Looper.prepare();与Looper.loop();两句话即可。如:...
分类:移动开发   时间:2014-08-27 20:34:08    阅读次数:352
1条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!