Android: How do I make a video splash screen repeat until webview finishes loading the url?
- by Nikoli4
I would like to make a small video (about 4 seconds) repeat until webview finishes loading the desired URL in the background. Right now the video plays once, then a blank black screen comes up until the page loads. I'm still pretty new to this... Thanks in advance for any help! Sorry for the EDITED stuff, but it was necessary.
Here is my splash java
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.widget.VideoView;
public class Splash extends Activity implements OnCompletionListener
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
VideoView video = (VideoView) findViewById(R.id.videoView);
video.setVideoPath("android.resource://com.EDITED/raw/" + R.raw.splash);
video.start();
video.setOnCompletionListener(this);
}
@Override
public void onCompletion(MediaPlayer mp)
{
Intent intent = new Intent(this, EDITEDWebActivity.class);
startActivity(intent);
finish();
}
}