0
32,我想PROG等待1000毫秒,並更改按鈕的標題......但PROG出現改變名稱SystemClock.wait()有什麼錯誤?
package com.catchthebutton;
import android.app.Activity;
import android.os.Bundle;
import android.os.SystemClock;
import android.widget.Button;
public class test extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Button bt = new Button(this);
setContentView(bt);
bt.setText("Wait");
SystemClock.sleep(10000);
bt.setText("OK");
}
}
是一種更簡單的方式嗎? – 2010-08-30 21:09:21
不是。 'Handler's已經非常簡單了。 – 2010-08-30 21:21:14