Question: I don't find any solution to show a loading animation (or just an imageView) before a VideoView start to play : during the video is buffering.

Does anyone have a clue ?

Thanks.

Answer: 
Or you can just use Progress Dialog;

```
public class VideoEkrani extends Activity {

    VideoView ekran;
    String kaynakYolu = "http://commonsware.com/misc/test2.3gp";
    ProgressDialog progDailog;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sayfa_video_goruntule);

        ekran = (VideoView) findViewById(R.id.videoViewESPU);
        ekran.setMediaController(new MediaController(this));
        ekran.setVideoURI(Uri.parse(kaynakYolu));
        ekran.requestFocus();
        ekran.start();

        progDailog = ProgressDialog.show(this, "Please wait ...", "Retrieving data ...", true);

        ekran.setOnPreparedListener(new OnPreparedListener() {

            public void onPrepared(MediaPlayer mp) {
                // TODO Auto-generated method stub
                progDailog.dismiss();
            }
        });
    }
}

```
You cant detect the video buffer using `OnBufferingUpdateListener` on `MediaPlayer`. If you use `VideView` set that listener inside `OnPreparedListener`.

```
videoview.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
   public void onPrepared(MediaPlayer mp) {
     mp.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
       @Override
       public void onBufferingUpdate(MediaPlayer mp, int percent) {
         if(percent == 100){
           //video have completed buffering
         }
       }
     });
   }
});

```