0
我有代碼:的Android AppWidget更新
int i = 0;
while(true){
i++;
remoteViews.setTextViewText(R.id.textView1, "" + i);
appWidgetManager.updateAppWidget(thisWidget, remoteViews);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
此代碼刷新我的小部件,但只有12次。當「我」達到12時沒有任何反應。如何解決它?
它是整個循環嗎? – 2013-05-13 15:25:06