i want to show the progress dialog before playing video. i tried below link example for playing video.
http://davanum.wordpress.com/2009/12/04/android-%E2%80%93-videomusic-player-sample-take-2/
it works but it takes more time to take for playing video so i want to show a progress dialog before start the video. so please tel me how to show the progress dialog before playing the video.
Thank you.
Best Regards.
The video progress bar makes it easy to check where you left off the last time you watched a video.
First, declare the progress dialog
private static ProgressDialog progressDialog;
Then, in onCreate, before calling runOnUiThread, start the dialog
progressDialog = ProgressDialog.show(this, "", "Loading...", true);
In playVideo, set a OnPreparedListener that will dismiss the dialog when the video is ready to play
mVideoView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer arg0) {
progressDialog.dismiss();
mVideoView.start();
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With