我有一個函數在隊列中運行消息。但是當我運行這個時,最後一個處理程序只能被執行,而不是第一個!幫幫我!處理程序沒有運行android
void functionShow()
{
button.setVisibility(View.INVISIBLE);
txt.setText("Generating Unique ID ... Please Wait ");
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
txt.setText("Sending SMS ... Please Wait");
}
}, 10000);
Handler handler1 = new Handler();
handler1.postDelayed(new Runnable() {
public void run()
{
txt.setText("Done");
}
}, 10000);
}
所有我試圖做的是:第一個文本應該在10秒後10秒「完成」
什麼是變量TXT? –
顯然是一個文本視圖! :d – Chandeep