我正在使用Splash Screens上的Android编程教程,在这里您可以显示5秒的图片或文本,而不是主应用程序.我的问题是..而不是文本或图片我想在显示应用程序的下一页之前显示5秒的视频文件.
我不是在谈论应用程序加载时我正在谈论何时加载它并且你编程它在一个单独的Java和XML页面上显示一些内容然后移动到其他东西......这是我当前的代码.
@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();
}
Run Code Online (Sandbox Code Playgroud)
那么我该怎么做才能让它显示一个没有启动/停止等的视频媒体文件.