2016-10-01 153 views

回答

4

您可以使用處理程序。

Handler handler = new Handler(); 
final static int DELAY = 1000; // one second 

public void playAudioWithDelay(){ 
    handler.postDelayed(new Runnable(){ 
    //your code start with delay in one second after calling this method 
    }, DELAY); 
    handler.postDelayed(new Runnable(){ 
    //your code start with delay in two seconds after calling this method 
    }, DELAY * 2); 
} 
+0

非常感謝!你剛剛救了我!我已經搜索,搜索和搜索,但沒有運氣。你是一個職業兄弟。 – Blure

+0

不客氣:) –

相關問題