视频作为一个闪屏,而不是照片 [英] Video as a Splash Screen instead of Picture

查看:135
本文介绍了视频作为一个闪屏,而不是照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的你在哪里显示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 听取和简单的步骤是什么创造了最好的做法闪屏

这篇关于视频作为一个闪屏,而不是照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆