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
AsyncTaskclass herestart the timer and ProgressBar on
onPreExecutePlay the particular sound inside
doInBackgroundand return when it is finishedSo in
onPostExecuteyou can make that PregressBar and Timer stop and invisibleAnd Button on click listener you can start its execution AsyncTask.
execute