嗨,我想刷新我的 android 应用程序。每次我遇到异常时都很奇怪,我的应用程序一直在爆炸……有这么难吗?这是我的代码:
public void refreshIt(long interv)
{
thr = new Thread();
try
{
thr.start();
while(refreshing)
{
writeToMe("refresh....");//my method writing msgs to textview, don't mind it
thr.sleep(1000);
}
}
catch(Exception e){writeToMe(e.getMessage());}
}