2016-10-01 126 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

不客气:) –

相关问题