视频作为一个闪屏,而不是照片

问题描述:

我做的你在哪里显示5秒的图片或文字比它进入主应用程序闪屏Android的编程教程。我的文字或图片的问题is..Instead我想显示一个视频文件为5秒,进入到应用程序的下一页之前。

I am doing the Android Programming Tutorial on Splash Screens where you show a picture or text for 5 Seconds than it goes to the Main Application. My Question is..Instead of Text or Pictures I want to display a Video File for 5 Seconds before it goes to the Next page of the Application.

我不是说当我谈论的应用程序加载时,它被加载,你设定让它显示在一个单独的Java&放一些有关; XML页面显示的东西,然后移动到东西else..here是我目前的code。

I am not talking about when the Application Loads I am talking about when it is Loaded and you program it to display something on a Separate Java & XML page to display something then move to something else..here is my current code.

@Override
protected void onCreate(Bundle SplashScreen1) {
    // TODO Auto-generated method stub
    super.onCreate(SplashScreen1);
    setContentView(R.layout.splash);
    ourSong = MediaPlayer.create(Splash.this, R.raw.splashsound);
    ourSong.start();
    Thread timer = new Thread(){
        public void run(){
            try{
                sleep(5000);
            } catch (InterruptedException e){
                e.printStackTrace();
            }finally{
                Intent openStartingPoint = new Intent("com.Player.Splash.STARTINGPOINT");
                startActivity(openStartingPoint);

            }
        }
    };
    timer.start();

}

@Override
protected void onPause() {
    // TODO Auto-generated method stub
    super.onPause();
    ourSong.release();
    finish();
}

所以,我该怎么做,使之不显示视频媒体文件启动/停止等。

So What Do I do to make it display a Video Media file without the Start/Stop etc..

我希望这会帮助你。您只需要创建一个简单的 VideoView 以创建视频闪屏。

I hope this will help you. You just create a simple VideoView for create a splash screen for the video.

签出的 源$ C ​​$ C 听取和简单的步骤是什么创造了最好的做法闪屏