开发者

dissmissing the Progress Bar after sometime

I have created a progress Bar which I need to show on clicking the Button that plays the particular sound. Now I want the timer to be displayed below the ProgressBar and want both the ProgressBar and Timer to run Simultaneously along with the length of the sound.

Also when the sound gets finished, I want the PregressBar and Timer to be invisible again so that I开发者_如何转开发 can start it again for the another Sound.

Can anybody please help me in this?

Thanks, david


Use AsyncTask class here start the timer and ProgressBar on onPreExecute
Play the particular sound inside doInBackground and return when it is finished
So in onPostExecute you can make that PregressBar and Timer stop and invisible
And Button on click listener you can start its execution AsyncTask.execute

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜