【发布时间】:2011-06-24 10:14:05
【问题描述】:
我不确定,是什么阻止了它的工作。我有代码设置导致 3 秒的时间延迟,但视图不工作,它保持黑色,然后在 3 秒后切换到下一个屏幕。我想,我正在做延时,并且在 Android 中没有调用某些东西来显示布局......
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
start = System.currentTimeMillis();
setContentView(R.layout.team);
}
protected void onStart()
{
super.onStart();
while(game)
{
now = System.currentTimeMillis();
if (now - start >= 5000)
{
game = false;
Intent about = new Intent(this, SplashScreen.class);
startActivity(about);
}
}
}
【问题讨论】: