public class LoadActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);// 去掉标题栏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.load);
change();
}
protected void change()
{
final Intent it = new Intent(this, MainActivity.class);
Timer timer = new Timer();
TimerTask task = new TimerTask()
{
@Override
public void run()
{
// Intent intent = new Intent(LoadActivity.this,
// MainActivity.class);
// // LoadActivity.this.finish(); i = false; } };
startActivity(it);
}
};
timer.schedule(task, 2000);//停止2s后由游戏载入页面再跳转到游戏菜单页面
}
}